alert

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CodeBlockFmt = "```%s```"

	// slackMsgFmt ... Slack message format
	SlackMsgFmt = `` /* 176-byte string literal not displayed */

)

TODO: add timestamp to the message

Variables

This section is empty.

Functions

This section is empty.

Types

type Interpolator

type Interpolator interface {
	InterpolateSlackMessage(sUUID core.SUUID, message string) string
}

Interpolator ... Interface for interpolating messages

func NewInterpolator

func NewInterpolator() Interpolator

NewInterpolator ... Initializer

type Manager

type Manager interface {
	AddSession(core.SUUID, core.AlertDestination) error
	Transit() chan core.Alert

	core.Subsystem
}

Manager ... Interface for alert manager

func NewManager

func NewManager(ctx context.Context, sc client.SlackClient) Manager

NewManager ... Instantiates a new alert manager

type Store

type Store interface {
	AddAlertDestination(core.SUUID, core.AlertDestination) error
	GetAlertDestination(sUUID core.SUUID) (core.AlertDestination, error)
}

Store ... Interface for alert store NOTE - This is a simple in-memory store, using this interface we can easily swap it out for a persistent store

func NewStore

func NewStore() Store

NewStore ... Initializer

Jump to

Keyboard shortcuts

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