source

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	SourceType         SourceType  `yaml:"type"`
	Name               string      `yaml:"name"`
	Group              *string     `yaml:"group,omitempty"`
	IncludeMonitorName bool        `yaml:"includeMonitorName"`
	Config             *RawMessage `yaml:"config"`
}

func (*Config) Validate

func (c *Config) Validate() error

type RawMessage

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

func (*RawMessage) Unmarshal

func (r *RawMessage) Unmarshal(v interface{}) error

func (*RawMessage) UnmarshalYAML

func (r *RawMessage) UnmarshalYAML(unmarshal func(interface{}) error) error

type Source

type Source interface {
	Start(ctx context.Context) error
	Stop(ctx context.Context) error
	GetType() string
	GetName() string
	Publish(ctx context.Context, e event.Event) error
}

func NewSource

func NewSource(ctx context.Context, log logrus.FieldLogger, monitor, sourceName string, docs *string, sourceType SourceType, includeMonitorName, includeGroupName bool, config *RawMessage) (Source, error)

type SourceType

type SourceType string
const (
	SourceTypeUnknown  SourceType = "unknown"
	SourceTypeDiscord  SourceType = "discord"
	SourceTypeSMTP     SourceType = "smtp"
	SourceTypeSES      SourceType = "ses"
	SourceTypeTelegram SourceType = "telegram"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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