Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action interface { Matches(result *health.Result) bool Invoke(state *ServiceState) Description() string }
type ActionDefinition ¶
type ActionDefinition struct { Trigger string ConsecutiveEvents *uint16 Duration *time.Duration Action string }
func (*ActionDefinition) CreateAction ¶
func (self *ActionDefinition) CreateAction() (Action, error)
func (*ActionDefinition) Description ¶
func (self *ActionDefinition) Description() string
type BaseCheckDefinition ¶
type BaseCheckDefinition struct { Interval time.Duration Timeout time.Duration Actions []*ActionDefinition }
func (*BaseCheckDefinition) CreateActions ¶
func (self *BaseCheckDefinition) CreateActions() ([]Action, error)
func (*BaseCheckDefinition) GetInterval ¶
func (self *BaseCheckDefinition) GetInterval() time.Duration
func (*BaseCheckDefinition) GetTimeout ¶ added in v0.19.141
func (self *BaseCheckDefinition) GetTimeout() time.Duration
type CheckDefinition ¶
type HttpCheckDefinition ¶
type HttpCheckDefinition struct { BaseCheckDefinition `mapstructure:",squash"` Url string Method string Body string ExpectStatus int ExpectBody string }
func (*HttpCheckDefinition) CreateCheck ¶
func (self *HttpCheckDefinition) CreateCheck(name string) (Check, error)
func (*HttpCheckDefinition) GetType ¶
func (self *HttpCheckDefinition) GetType() string
func (*HttpCheckDefinition) String ¶
func (self *HttpCheckDefinition) String() string
type Manager ¶
type Manager interface { RegisterServiceChecks(service *ServiceState, checkDefinitions []CheckDefinition) error UnregisterServiceChecks(service string) UnregisterServiceContextChecks(service, context string) Shutdown() }
func NewManager ¶
func NewManager() Manager
type PortCheckDefinition ¶
type PortCheckDefinition struct { BaseCheckDefinition `mapstructure:",squash"` Address string }
func (*PortCheckDefinition) CreateCheck ¶
func (self *PortCheckDefinition) CreateCheck(name string) (Check, error)
func (*PortCheckDefinition) GetType ¶
func (self *PortCheckDefinition) GetType() string
func (*PortCheckDefinition) String ¶
func (self *PortCheckDefinition) String() string
type ServiceState ¶
type ServiceState struct { Service string HostContext string BaselinePrecedence edge.Precedence BaselineCost uint16 Updater ServiceUpdater // contains filtered or unexported fields }
func NewServiceState ¶
func NewServiceState(service string, precedence ziti.Precedence, cost uint16, updater ServiceUpdater) *ServiceState
func NewServiceStateWithContext ¶ added in v0.19.54
func NewServiceStateWithContext(service, hostContext string, precedence ziti.Precedence, cost uint16, updater ServiceUpdater) *ServiceState
func (*ServiceState) HandleActionResults ¶ added in v0.19.54
func (self *ServiceState) HandleActionResults(healthy bool)
func (*ServiceState) IsChanged ¶
func (self *ServiceState) IsChanged() bool
type ServiceUpdater ¶
Click to show internal directories.
Click to hide internal directories.