notifier

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chain added in v1.2.0

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

func NewChain added in v1.2.0

func NewChain(c *http.Client, notifierConfig config.NotifiersConfig) *Chain

func (*Chain) GetNotifiers added in v1.2.0

func (c *Chain) GetNotifiers(client *http.Client) ([]aggregator.Notifier, error)

func (*Chain) Notify added in v1.2.0

func (c *Chain) Notify(ctx context.Context, msg aggregator.RateChange) error

type Desktop

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

func NewDesktop

func NewDesktop() *Desktop

func (*Desktop) Notify

func (d *Desktop) Notify(_ context.Context, msg aggregator.RateChange) error

type Email

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

func NewEmail

func NewEmail(
	dialer mail.Dialer,
	receiverParameters config.EmailReceiverParameters,
	connectionParameters config.EmailConnectionParameters,
	formatter formatter.MessageFormatStrategy) *Email

func (*Email) Notify

func (e *Email) Notify(_ context.Context, msg aggregator.RateChange) error

type Http added in v1.3.0

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

func NewHttp added in v1.3.0

func NewHttp(
	client *http.Client,
	url url.URL,
	method string,
	acceptedStatuses []int,
	extraHeaders map[string]string,
) *Http

func (*Http) Notify added in v1.3.0

func (h *Http) Notify(ctx context.Context, rateChange aggregator.RateChange) error

type Provider added in v1.2.0

type Provider interface {
	GetNotifiers() []aggregator.Notifier
}

Jump to

Keyboard shortcuts

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