webhook

package
v1.2.7 Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SinkName = "webHook"
	Warning  = "Warning"
	Normal   = "Normal"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type WebHookSink

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

func NewWebHookSink

func NewWebHookSink(uri *url.URL) (*WebHookSink, error)

init WebHookSink with url params

func (*WebHookSink) ExportEvents

func (ws *WebHookSink) ExportEvents(batch *core.EventBatch)

func (*WebHookSink) Name

func (ws *WebHookSink) Name() string

func (*WebHookSink) RenderBodyTemplate

func (ws *WebHookSink) RenderBodyTemplate(event *v1.Event) (body string, err error)

func (*WebHookSink) Send

func (ws *WebHookSink) Send(event *v1.Event) (err error)

send msg to generic webHook

func (*WebHookSink) Stop

func (ws *WebHookSink) Stop()

Jump to

Keyboard shortcuts

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