Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EcsMetadata ¶
type FakeTicker ¶
FakeTicker allows us to manually control when a send happens on the channel. The Ticker property allows us to adhere to the *time.Ticker interface.
func NewFakeTicker ¶
func NewFakeTicker() *FakeTicker
func (*FakeTicker) Stop ¶
func (f *FakeTicker) Stop()
func (*FakeTicker) Tick ¶
func (f *FakeTicker) Tick(ctx context.Context)
type HealthConfig ¶
type HealthConfig struct { DisableECSBehavior bool // whether or not to disable container instance attributing MaxHealthyLatency time.Duration // the max latency which is considered healthy AttributeName string // the attribute name to indicate ledger latency health HealthyAttributeValue string // if ledger latency is healthy use this attribute value UnhealthyAttributeValue string // if ledger latency is unhealthy use this attribute value PollInterval time.Duration // how often to check for ledger latency AWSRegion string // which region to use for setting instance atts }
HealthConfig configures the behavior of the container instance attribute setting. Ledger latency health will be reflected in container instance attributes.
type Monitor ¶
type Monitor struct {
// contains filtered or unexported fields
}
Monitor is the main type which performs the ledger health monitoring.
func NewLedgerMonitor ¶
func NewLedgerMonitor(cfg HealthConfig, llf latencyFunc, opts ...MonitorOpt) (*Monitor, error)
type MonitorOpt ¶
type MonitorOpt func(monitor *Monitor)
func WithCheckCallback ¶
func WithCheckCallback(fn func()) MonitorOpt
func WithECSClient ¶
func WithECSClient(ecsClient ECSClient) MonitorOpt
func WithECSMetadataFunc ¶
func WithECSMetadataFunc(fn ecsMetadataFunc) MonitorOpt
func WithTicker ¶
func WithTicker(ticker *time.Ticker) MonitorOpt
Source Files ¶
Click to show internal directories.
Click to hide internal directories.