Documentation
¶
Index ¶
- Constants
- type ChecksCommand
- func (c *ChecksCommand) Handle(s *discordgo.Session, i *discordgo.InteractionCreate)
- func (c *ChecksCommand) Name() string
- func (c *ChecksCommand) Queue() *queue.AlertQueue
- func (c *ChecksCommand) Register(session *discordgo.Session) error
- func (c *ChecksCommand) RunChecks(ctx context.Context, alert *store.MonitorAlert) (bool, error)
Constants ¶
View Source
const (
// DefaultCheckSchedule defines when checks should run (daily at 7am UTC).
DefaultCheckSchedule = "0 7 * * *"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChecksCommand ¶
type ChecksCommand struct {
// contains filtered or unexported fields
}
ChecksCommand handles the /checks command.
func NewChecksCommand ¶
func NewChecksCommand(log *logrus.Logger, bot common.BotContext) *ChecksCommand
NewChecksCommand creates a new checks command.
func (*ChecksCommand) Handle ¶
func (c *ChecksCommand) Handle(s *discordgo.Session, i *discordgo.InteractionCreate)
Handle handles the /checks command.
func (*ChecksCommand) Name ¶
func (c *ChecksCommand) Name() string
Name returns the name of the command.
func (*ChecksCommand) Queue ¶
func (c *ChecksCommand) Queue() *queue.AlertQueue
Queue returns the queue instance.
func (*ChecksCommand) Register ¶
func (c *ChecksCommand) Register(session *discordgo.Session) error
Register registers the /checks command with the given discord session.
func (*ChecksCommand) RunChecks ¶
func (c *ChecksCommand) RunChecks(ctx context.Context, alert *store.MonitorAlert) (bool, error)
RunChecks runs the health checks for a given alert.
Click to show internal directories.
Click to hide internal directories.