common

package
v1.13.2 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ListenerKindWebsocket string = "websocket"
	ListenerKindSlack     string = "slack"
	ListenerKindWebhook   string = "webhook"
)

Variables

This section is empty.

Functions

func CompareListeners added in v1.6.10

func CompareListeners(a, b Listener) bool

CompareListeners compares listeners by metadata

func ListenerName added in v1.5.17

func ListenerName(in string) string

ListenerName returns name of listener which can be used by event bus to identify listener

Types

type Listener

type Listener interface {
	// Name uniquely identifies listener
	Name() string
	// Notify sends event to listener
	Notify(event testkube.Event) testkube.EventResult
	// Kind of listener
	Kind() string
	// Selector is used to filter events
	Selector() string
	// Event is used to filter events
	Events() []testkube.EventType
	// Metadata with additional information about listener
	Metadata() map[string]string
}

type ListenerLoader

type ListenerLoader interface {
	// Load listeners from configuration
	Load() (listeners Listeners, err error)
}

type Listeners

type Listeners []Listener

func (Listeners) Log

func (l Listeners) Log() []any

Jump to

Keyboard shortcuts

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