discord

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const SourceType = "discord"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Webhook string `yaml:"webhook"`
}

func (*Config) Validate

func (c *Config) Validate() error

type Discord

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

func NewDiscord

func NewDiscord(ctx context.Context, log logrus.FieldLogger, monitor, name string, docs *string, includeMonitorName, includeGroupName bool, config *Config) (*Discord, error)

func (*Discord) GetConfig

func (c *Discord) GetConfig() *Config

func (*Discord) GetName

func (c *Discord) GetName() string

func (*Discord) GetType

func (c *Discord) GetType() string

func (*Discord) Publish

func (c *Discord) Publish(ctx context.Context, e event.Event) error

func (*Discord) Start

func (c *Discord) Start(ctx context.Context) error

func (*Discord) Stop

func (c *Discord) Stop(ctx context.Context) error

type Metrics

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

func GetMetricsInstance

func GetMetricsInstance(namespace, monitor string) *Metrics

func (Metrics) IncErrors

func (m Metrics) IncErrors(group, source, sourceType, errorType, statusCode string)

func (Metrics) IncMessagesPublished

func (m Metrics) IncMessagesPublished(group, source, sourceType string)

Jump to

Keyboard shortcuts

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