alertmanagertypes

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 29, 2020 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alert

type Alert struct {
	Key       string    `json:"alert_key"`
	Subject   string    `json:"subject"` // same type of error should always have same subject
	Details   string    `json:"details"`
	Timestamp time.Time `json:"timestamp"`
}

func NewAlert

func NewAlert(subject string, details string) Alert

func (*Alert) Equal

func (a *Alert) Equal(other Alert) bool

type DeadMansSwitch

type DeadMansSwitch struct {
	Subject string    `json:"subject"`
	TTL     time.Time `json:"ttl"`
}

func (*DeadMansSwitch) AsAlert

func (d *DeadMansSwitch) AsAlert(now time.Time) Alert

type DeadMansSwitchCheckinRequest

type DeadMansSwitchCheckinRequest struct {
	Subject string `json:"subject"`
	TTL     string `json:"ttl"`
}

otherwise the same but TTL in un-expanded form

func NewDeadMansSwitchCheckinRequest

func NewDeadMansSwitchCheckinRequest(subject string, ttl string) DeadMansSwitchCheckinRequest

func (*DeadMansSwitchCheckinRequest) AsAlert

func (d *DeadMansSwitchCheckinRequest) AsAlert(details string) Alert

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL