blob: f751898b7c9cc38ac6794572258b4d4ebc2038e9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
package status
import "net/http"
// Config is the configuration reference for the Status plugin
type Config struct {
// Address of the http server
Address string
// Status code returned in case of fail, 503 by default
UnavailableStatusCode int `mapstructure:"unavailable_status_code"`
}
// InitDefaults configuration options
func (c *Config) InitDefaults() {
if c.UnavailableStatusCode == 0 {
c.UnavailableStatusCode = http.StatusServiceUnavailable
}
}
|