Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DockerServiceHealthProvider ¶
type DockerServiceHealthProvider struct {
// contains filtered or unexported fields
}
DockerServiceHealthProvider provides service health for docker containers through docker's API.
func NewDockerServiceHealthProvider ¶
func NewDockerServiceHealthProvider() (*DockerServiceHealthProvider, error)
NewDockerServiceHealthProvider creates a new DockerServiceHealthProvider with an initialized docker client.
func (*DockerServiceHealthProvider) GetUnhealthyServices ¶
func (d *DockerServiceHealthProvider) GetUnhealthyServices() ([]string, error)
GetUnhealthyServices returns all docker services failing their health checks.
func (*DockerServiceHealthProvider) Restart ¶
func (d *DockerServiceHealthProvider) Restart(service string) error
Restart restarts the service provided
func (*DockerServiceHealthProvider) Stop ¶
func (d *DockerServiceHealthProvider) Stop(service string) error
Stop stops the service provided
type ServiceHealth ¶
type ServiceHealth interface { // GetUnhealthyServices return a list of services found to be in an // unhealthy state. GetUnhealthyServices() ([]string, error) // Restart restarts the provided service. Restart(service string) error // Stop stops the provided service. Stop(service string) error }
ServiceHealth defines an interface to fetch unhealthy services and enable functionality necessary for promotion/demotions of the gateway.
Click to show internal directories.
Click to hide internal directories.