notifiers

package
v0.0.0-...-b7fae21 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2020 License: MIT Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Notifier

type Notifier interface {
	Initialize(context.Context) error
	Configure(map[string]interface{}) error
	Notify(string) error
}

Notifier interface is the interface that all notifiers has to implement

func FromString

func FromString(checkType string) (Notifier, error)

FromString returns a `Check` parsed by a string

type SlackNotifier

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

SlackNotifier holds the configuration for an instance of slack notifier

func (*SlackNotifier) Configure

func (notifier *SlackNotifier) Configure(config map[string]interface{}) error

Configure configures the slack notifier, it creates a new slack client and finds the channel ID by the configured channel name. It also verifies that the auth token is correct

func (*SlackNotifier) Initialize

func (notifier *SlackNotifier) Initialize(ctx context.Context) error

Initialize initializes the slack notifier

func (*SlackNotifier) Notify

func (notifier *SlackNotifier) Notify(msg string) error

Notify notifies tha slack channel with the given message

Jump to

Keyboard shortcuts

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