Versions in this module Expand all Collapse all v0 v0.7.0 Sep 28, 2019 v0.1.1 Sep 24, 2019 Changes in this version + const DefaultAlertExpiration + type Alert struct + Expiration *time.Time + Message string + Type AlertType + func CreateAlert(alertType AlertType, message string, expireAt time.Duration) Alert + type AlertType string + const AlertTypeError + const AlertTypeInfo + const AlertTypeWarning + type Alerter interface + SendAlert func(alert Alert) + type Dispatcher interface + ActionName func() string + Handle func(ctx context.Context, alerter Alerter, payload Payload) error + type DispatcherFunc func(ctx context.Context, alerter Alerter, payload Payload) error + type Dispatchers []Dispatcher + func (d Dispatchers) ToActionPaths() map[string]DispatcherFunc + type Manager struct + func NewManager(logger log.Logger) *Manager + func (m *Manager) Dispatch(ctx context.Context, alerter Alerter, actionPath string, payload Payload) error + func (m *Manager) Register(actionPath string, actionFunc DispatcherFunc) error + type NotFoundError struct + Path string + func (e *NotFoundError) Error() string + type Payload map[string]interface + func (p Payload) Float64(key string) (float64, error) + func (p Payload) GroupVersionKind() (schema.GroupVersionKind, error) + func (p Payload) OptionalString(key string) (string, error) + func (p Payload) String(key string) (string, error) + func (p Payload) StringSlice(key string) ([]string, error) + func (p Payload) Uint16(key string) (uint16, error) + func CreatePayload(actionName string, fields map[string]interface{}) Payload