slack

package
v0.13.4 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package slack implements slack notifications for Cloudprober alert events.

Index

Constants

View Source
const (
	// DEFAULT_SLACK_WEBHOOK_URL_ENV_VAR is the default environment variable
	// to use for the Slack webhook URL.
	DEFAULT_SLACK_WEBHOOK_URL_ENV_VAR = "SLACK_WEBHOOK_URL"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is a Slack client.

func New

func New(slackcfg *configpb.Slack, l *logger.Logger) (*Client, error)

New creates a new Slack client.

func (*Client) Notify

func (c *Client) Notify(ctx context.Context, alertFields map[string]string) error

Notify sends a notification to Slack.

Jump to

Keyboard shortcuts

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