notification

package
v0.0.0-...-8e7039a Latest Latest
Warning

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

Go to latest
Published: May 24, 2017 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Retry   = "SenderError"
	Success = "SenderSuccess"
	Fail    = "SenderFail"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// MaxWorkers controls how many go routines should be dedicated to sending notifications
	MaxWorkers int
	// MaxDepth controls how many pending sends/results can be awaiting processing
	MaxDepth int
}

Config options for the notifier.

type Message

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

Message contians the notification to send and a retry counter for delayed retries

type Notification

type Notification interface {
	// Host to notify notification
	Host() string
	// Path on the host
	Path() string
	// Body of the notification
	Body() []byte
}

Notification must be implemented on messages passed through the notifier

type Notifier

type Notifier interface {
	Start()
	Stop()
	Stopped() bool
	Send(note Notification)
}

func New

func New(config *Config, key *rsa.PrivateKey) Notifier

type Result

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

type Sender

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

func (*Sender) Do

func (s *Sender) Do() interface{}

Jump to

Keyboard shortcuts

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