alarm

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Alarm

func Alarm(message string)

Types

type Config

type Config struct {
	Type    string   `yml:"type"`
	Targets []string `yml:"targets"`
}

func ExampleConfig

func ExampleConfig() []*Config

type SMTPConfig

type SMTPConfig struct {
	Username string `yml:"username"`
	Password string `yml:"password"`
	From     string `yml:"from"`
	Server   string `yml:"Server"`
}

func SMTPExampleConfig

func SMTPExampleConfig() *SMTPConfig

func (*SMTPConfig) Send

func (cfg *SMTPConfig) Send(targets []string, message string)

type WebHookConfig

type WebHookConfig struct {
	Method  string        `yml:"method"`
	TimeOut time.Duration `yml:"timeout"`
}

func WebHookExampleConfig

func WebHookExampleConfig() *WebHookConfig

func (*WebHookConfig) Send

func (cfg *WebHookConfig) Send(targets []string, message string)

Jump to

Keyboard shortcuts

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