Back to

Package slack

Latest Go to latest

The highest tagged major version is .

Published: Dec 5, 2019 | License: MIT | Module:


func NewNotifier

func NewNotifier(token string, channel string) (notifier.Notifier, error)

NewNotifier function returns new instance of Slack. The destination channel is fixed when initialize.

func String

func String() string

String function used by pattern match when parse interpret options.

type API

type API interface {
	PostMessage(string, string, libSlack.PostMessageParameters) (string, string, error)

API interface defines slack's API behavior. API interface defined to wrap the library:

type Slack

type Slack struct {
	APIClient   API
	ChannelName string
	RateLimiter ratelimit.Limiter

Slack struct implements notifier.Notifier interface. Slack struct sends alert over RESTful API.

func (*Slack) Alert

func (s *Slack) Alert(expiration time.Time, ingress *source.Ingress, tls *source.IngressTLS, opt notifier.Option) error

Alert defined by notifier.Notifier interface. This implementation post message that includes infromation about ingress and TLS and those deadline.

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier