sink

package
v0.1.16 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 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 CustomizeRequest

type CustomizeRequest func(request *http.Request) error

type DiscardSink added in v0.1.5

type DiscardSink struct {
}

func (DiscardSink) Report added in v0.1.5

func (s DiscardSink) Report(_ *alert.Alerts) error

type JsonSink

type JsonSink struct {
}

func (JsonSink) Report

func (s JsonSink) Report(alerts *alert.Alerts) error

type MultiSink added in v0.1.5

type MultiSink struct {
	Sinks []Sink
}

func (MultiSink) Report added in v0.1.5

func (s MultiSink) Report(alerts *alert.Alerts) (aggregatedErr error)

type PrettySink

type PrettySink struct {
}

func (PrettySink) Report

func (s PrettySink) Report(alerts *alert.Alerts) error

type ResponseVerify added in v0.1.5

type ResponseVerify func(response *http.Response, responseBody string) error

type Sink

type Sink interface {
	Report(alerts *alert.Alerts) error
}

func CreateWebSink

func CreateWebSink(postUrl string, transportGetter TransportGetter, customizeRequest CustomizeRequest, responseVerify ResponseVerify, tlsSkipVerify bool) (Sink, error)

type TransportGetter added in v0.1.6

type TransportGetter func() (http.RoundTripper, error)

type YamlSink

type YamlSink struct {
}

func (YamlSink) Report

func (s YamlSink) Report(alerts *alert.Alerts) error

Jump to

Keyboard shortcuts

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