sink

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alert

type Alert struct {
	ClusterName string   `json:"cluster_name"`
	Content     []string `json:"content"`
}

type CustomizeRequest

type CustomizeRequest func(request *http.Request) error

type JsonSink

type JsonSink struct {
}

func (JsonSink) Report

func (s JsonSink) Report(message Alert) error

type PrettySink

type PrettySink struct {
}

func (PrettySink) Report

func (s PrettySink) Report(message Alert) error

type Sink

type Sink interface {
	Report(message Alert) error
}

func CreateSlackSink

func CreateSlackSink(webhookUrl string) (Sink, error)

func CreateWebSink

func CreateWebSink(postUrl string, customizeRequest CustomizeRequest, tlsSkipVerify bool) (Sink, error)

type YamlSink

type YamlSink struct {
}

func (YamlSink) Report

func (s YamlSink) Report(message Alert) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳