slack

package
v0.0.0-...-0c5dbc6 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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.

Types

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: github.com/nlopes/slack

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.

Jump to

Keyboard shortcuts

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