Improve API endpoints

This commit is contained in:
Ludovic Fernandez 2019-07-12 11:10:03 +02:00 committed by Traefiker Bot
parent c8bf8e896a
commit 74c5ec70a9
20 changed files with 2266 additions and 1204 deletions

4
pkg/api/testdata/entrypoint-bar.json vendored Normal file
View file

@ -0,0 +1,4 @@
{
"address": ":81",
"name": "bar"
}

View file

@ -0,0 +1 @@
[]

View file

@ -0,0 +1,22 @@
[
{
"address": ":14",
"name": "ep14"
},
{
"address": ":15",
"name": "ep15"
},
{
"address": ":16",
"name": "ep16"
},
{
"address": ":17",
"name": "ep17"
},
{
"address": ":18",
"name": "ep18"
}
]

View file

@ -0,0 +1,6 @@
[
{
"address": ":82",
"name": "web2"
}
]

60
pkg/api/testdata/entrypoints.json vendored Normal file
View file

@ -0,0 +1,60 @@
[
{
"address": ":80",
"forwardedHeaders": {
"insecure": true,
"trustedIPs": [
"192.168.1.3",
"192.168.1.4"
]
},
"name": "web",
"proxyProtocol": {
"insecure": true,
"trustedIPs": [
"192.168.1.1",
"192.168.1.2"
]
},
"transport": {
"lifeCycle": {
"graceTimeOut": 2,
"requestAcceptGraceTimeout": 1
},
"respondingTimeouts": {
"idleTimeout": 5,
"readTimeout": 3,
"writeTimeout": 4
}
}
},
{
"address": ":443",
"forwardedHeaders": {
"insecure": true,
"trustedIPs": [
"192.168.1.30",
"192.168.1.40"
]
},
"name": "web-secure",
"proxyProtocol": {
"insecure": true,
"trustedIPs": [
"192.168.1.10",
"192.168.1.20"
]
},
"transport": {
"lifeCycle": {
"graceTimeOut": 20,
"requestAcceptGraceTimeout": 10
},
"respondingTimeouts": {
"idleTimeout": 50,
"readTimeout": 30,
"writeTimeout": 40
}
}
}
]

36
pkg/api/testdata/overview-dynamic.json vendored Normal file
View file

@ -0,0 +1,36 @@
{
"features": {
"accessLog": false,
"metrics": "",
"tracing": ""
},
"http": {
"middlewares": {
"errors": 0,
"total": 3,
"warnings": 0
},
"routers": {
"errors": 0,
"total": 2,
"warnings": 0
},
"services": {
"errors": 0,
"total": 1,
"warnings": 0
}
},
"tcp": {
"routers": {
"errors": 0,
"total": 2,
"warnings": 0
},
"services": {
"errors": 0,
"total": 1,
"warnings": 0
}
}
}

36
pkg/api/testdata/overview-empty.json vendored Normal file
View file

@ -0,0 +1,36 @@
{
"features": {
"accessLog": false,
"metrics": "",
"tracing": ""
},
"http": {
"middlewares": {
"errors": 0,
"total": 0,
"warnings": 0
},
"routers": {
"errors": 0,
"total": 0,
"warnings": 0
},
"services": {
"errors": 0,
"total": 0,
"warnings": 0
}
},
"tcp": {
"routers": {
"errors": 0,
"total": 0,
"warnings": 0
},
"services": {
"errors": 0,
"total": 0,
"warnings": 0
}
}
}

36
pkg/api/testdata/overview-features.json vendored Normal file
View file

@ -0,0 +1,36 @@
{
"features": {
"accessLog": false,
"metrics": "Prometheus",
"tracing": "Jaeger"
},
"http": {
"middlewares": {
"errors": 0,
"total": 0,
"warnings": 0
},
"routers": {
"errors": 0,
"total": 0,
"warnings": 0
},
"services": {
"errors": 0,
"total": 0,
"warnings": 0
}
},
"tcp": {
"routers": {
"errors": 0,
"total": 0,
"warnings": 0
},
"services": {
"errors": 0,
"total": 0,
"warnings": 0
}
}
}

View file

@ -0,0 +1,45 @@
{
"features": {
"accessLog": false,
"metrics": "",
"tracing": ""
},
"http": {
"middlewares": {
"errors": 0,
"total": 0,
"warnings": 0
},
"routers": {
"errors": 0,
"total": 0,
"warnings": 0
},
"services": {
"errors": 0,
"total": 0,
"warnings": 0
}
},
"providers": [
"Docker",
"File",
"Marathon",
"KubernetesIngress",
"KubernetesCRD",
"Rest",
"Rancher"
],
"tcp": {
"routers": {
"errors": 0,
"total": 0,
"warnings": 0
},
"services": {
"errors": 0,
"total": 0,
"warnings": 0
}
}
}