Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HealthCheckContainer ¶
type HealthCheckContainer struct { // Timeout expressed as a go duration i.e 10s Timeout string `hcl:"timeout" json:"timeout"` HTTP []HealthCheckHTTP `hcl:"http,block" json:"http,omitempty"` TCP []HealthCheckTCP `hcl:"tcp,block" json:"tcp,omitempty"` Exec []HealthCheckExec `hcl:"exec,block" json:"exec,omitempty"` }
HealthCheckContainer is an internal block for configuration which allows the user to define the criteria for successful creation
type HealthCheckExec ¶
type HealthCheckExec struct { // Command to execute, the command is run in the target container Command []string `hcl:"command,optional" json:"command,omitempty"` // Script specified as a string to execute, the script can be a bash or a sh script // scripts are copied to the container /tmp directory, marked as executable and run Script string `hcl:"script,optional" json:"script,omitempty"` // ExitCode to mark a successful check, default 0 ExitCode int `hcl:"exit_code,optional" json:"exit_code,omitempty"` }
type HealthCheckHTTP ¶
type HealthCheckHTTP struct { Address string `hcl:"address" json:"address,omitempty"` // HTTP endpoint to check Method string `hcl:"method,optional" json:"method,omitempty"` // HTTP method to use, default GET Body string `hcl:"body,optional" json:"body,omitempty"` // Payload to send with check Headers map[string][]string `hcl:"headers,optional" json:"headers,omitempty"` // HTTP headers to send with request SuccessCodes []int `hcl:"success_codes,optional" json:"success_codes,omitempty"` // HTTP status codes that signal the health of the endpoint, default 200 }
HealthCheckHTTP defines a HTTP based health check
type HealthCheckKubernetes ¶
type HealthCheckNomad ¶
type HealthCheckTCP ¶
type HealthCheckTCP struct { // address = "consul-consul:8500" // can a TCP connection be made Address string `hcl:"address" json:"address,omitempty"` }
Click to show internal directories.
Click to hide internal directories.