mirror of
https://github.com/prometheus/prometheus.git
synced 2025-01-12 14:27:27 -08:00
vultr: minor fixups
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
This commit is contained in:
parent
3ef153b00c
commit
c9d4e5fc94
|
@ -27,25 +27,25 @@ type SDMock struct {
|
||||||
Mux *http.ServeMux
|
Mux *http.ServeMux
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewSDMock returns a new SDMock.
|
// NewSDMock returns a new Vultr mock server.
|
||||||
func NewSDMock(t *testing.T) *SDMock {
|
func NewSDMock(t *testing.T) *SDMock {
|
||||||
return &SDMock{
|
return &SDMock{
|
||||||
t: t,
|
t: t,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Endpoint returns the URI to the mock server
|
// Endpoint returns the URI to the mock server.
|
||||||
func (m *SDMock) Endpoint() string {
|
func (m *SDMock) Endpoint() string {
|
||||||
return m.Server.URL + "/"
|
return m.Server.URL + "/"
|
||||||
}
|
}
|
||||||
|
|
||||||
// Setup creates the mock server
|
// Setup creates the mock server.
|
||||||
func (m *SDMock) Setup() {
|
func (m *SDMock) Setup() {
|
||||||
m.Mux = http.NewServeMux()
|
m.Mux = http.NewServeMux()
|
||||||
m.Server = httptest.NewServer(m.Mux)
|
m.Server = httptest.NewServer(m.Mux)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ShutdownServer creates the mock server
|
// ShutdownServer shuts down the mock server.
|
||||||
func (m *SDMock) ShutdownServer() {
|
func (m *SDMock) ShutdownServer() {
|
||||||
m.Server.Close()
|
m.Server.Close()
|
||||||
}
|
}
|
||||||
|
|
|
@ -2595,23 +2595,23 @@ oauth2:
|
||||||
[ <oauth2> ]
|
[ <oauth2> ]
|
||||||
|
|
||||||
# Optional proxy URL.
|
# Optional proxy URL.
|
||||||
[ proxy_url: <string> ]
|
[ proxy_url: <string> ]
|
||||||
|
|
||||||
# Configure whether HTTP requests follow HTTP 3xx redirects.
|
# Configure whether HTTP requests follow HTTP 3xx redirects.
|
||||||
[ follow_redirects: <boolean> | default = true ]
|
[ follow_redirects: <boolean> | default = true ]
|
||||||
|
|
||||||
# Whether to enable HTTP2.
|
# Whether to enable HTTP2.
|
||||||
[ enable_http2: <bool> | default: true ]
|
[ enable_http2: <bool> | default: true ]
|
||||||
|
|
||||||
# TLS configuration.
|
# TLS configuration.
|
||||||
tls_config:
|
tls_config:
|
||||||
[ <tls_config> ]
|
[ <tls_config> ]
|
||||||
|
|
||||||
# The port to scrape metrics from.
|
# The port to scrape metrics from.
|
||||||
[ port: <int> | default = 80 ]
|
[ port: <int> | default = 80 ]
|
||||||
|
|
||||||
# The time after which the instances are refreshed.
|
# The time after which the instances are refreshed.
|
||||||
[ refresh_interval: <duration> | default = 60s ]
|
[ refresh_interval: <duration> | default = 60s ]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue