Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertMetricAlarmToAlarmSNSPayload ¶
func ConvertMetricAlarmToAlarmSNSPayload(alarm types.MetricAlarm) (*events.CloudWatchAlarmSNSPayload, error)
Types ¶
type BarkItem ¶
type BarkItem struct { BarkItemKey LastBarkedAt time.Time `json:"last_barked_at" dynamodbav:"last_barked_at"` TTL int64 `json:"ttl" dynamodbav:"ttl"` }
BarkItem represents an item stored in DynamoDB.
type BarkItemKey ¶
type BarkItemKey struct { AlarmID string `json:"alarm_id" dynamodbav:"alarm_id"` // hash key StateUpdatedAt int64 `json:"state_updated_at" dynamodbav:"state_updated_at"` // range key }
BarkItemKey represents a primary key of the BarkItem.
type Doggo ¶
type Doggo struct { SNS *sns.Client CloudWatch *cloudwatch.Client DynamoDB *dynamodb.Client // DynamoDB Table to store the state TableName string // Amazon SNS Topic used with AWS Chatbot BarkSNSArn string // An interval to bark again since the last bark BarkInterval time.Duration // If true, it will print debug logs. DebugOn bool }
func (*Doggo) Bark ¶
func (d *Doggo) Bark(alarm types.MetricAlarm) error
Bark sends a given alarm to actions specified in the alarm.
func (*Doggo) GetLatestBarkStatus ¶
func (d *Doggo) GetLatestBarkStatus(alarm types.MetricAlarm) (*BarkItem, error)
func (*Doggo) ListAlarmsInAlarm ¶
func (d *Doggo) ListAlarmsInAlarm() ([]types.MetricAlarm, error)
Click to show internal directories.
Click to hide internal directories.