message

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2025 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlertMessageBuilder

type AlertMessageBuilder struct {
	// contains filtered or unexported fields
}

AlertMessageBuilder builds the alert message.

func NewAlertMessageBuilder

func NewAlertMessageBuilder(cfg *Config) *AlertMessageBuilder

NewAlertMessageBuilder creates a new AlertMessageBuilder.

func (*AlertMessageBuilder) BuildHiveMessage

func (b *AlertMessageBuilder) BuildHiveMessage(content []byte) *discordgo.MessageSend

BuildHiveMessage builds the Hive message.

func (*AlertMessageBuilder) BuildMainMessage

func (b *AlertMessageBuilder) BuildMainMessage() *discordgo.MessageSend

BuildMainMessage builds the main message.

func (*AlertMessageBuilder) BuildMentionMessage

func (b *AlertMessageBuilder) BuildMentionMessage(mentions []string) *discordgo.MessageSend

BuildMentionMessage builds the mention message.

func (*AlertMessageBuilder) BuildThreadMessages

func (b *AlertMessageBuilder) BuildThreadMessages(category checks.Category, failedChecks []*checks.Result) []string

BuildThreadMessages builds the category message.

func (*AlertMessageBuilder) HasOnlyInfraOrUnrelatedIssues added in v0.0.16

func (b *AlertMessageBuilder) HasOnlyInfraOrUnrelatedIssues() bool

HasOnlyInfraOrUnrelatedIssues returns true if all issues detected are infrastructure or unrelated.

type Config

type Config struct {
	CheckID        string
	Alert          *store.MonitorAlert
	Results        []*checks.Result
	HiveAvailable  bool
	GrafanaBaseURL string
	HiveBaseURL    string
	RootCauses     []string // List of clients determined to be root causes
}

Jump to

Keyboard shortcuts

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