event

package
v1.16.25-beta001 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Emitter

type Emitter struct {
	Results   chan testkube.EventResult
	Listeners common.Listeners
	Loader    *Loader
	Log       *zap.SugaredLogger

	Bus         bus.Bus
	ClusterName string
	Envs        map[string]string
	// contains filtered or unexported fields
}

Emitter handles events emitting for webhooks

func NewEmitter

func NewEmitter(eventBus bus.Bus, clusterName string, envs map[string]string) *Emitter

NewEmitter returns new emitter instance

func (*Emitter) Listen added in v1.5.17

func (e *Emitter) Listen(ctx context.Context)

Listen runs emitter workers responsible for sending HTTP requests

func (*Emitter) Notify

func (e *Emitter) Notify(event testkube.Event)

Notify notifies emitter with webhook

func (*Emitter) Reconcile

func (e *Emitter) Reconcile(ctx context.Context)

Reconcile reloads listeners from all registered reconcilers

func (*Emitter) Register

func (e *Emitter) Register(listener common.Listener)

Register adds new listener

func (*Emitter) UpdateListeners added in v1.5.17

func (e *Emitter) UpdateListeners(listeners common.Listeners)

UpdateListeners updates listeners list

type Loader

type Loader struct {
	Log     *zap.SugaredLogger
	Loaders []common.ListenerLoader
}

Loader updates list of available listeners in the background as we don't want to load them on each event

func NewLoader

func NewLoader() *Loader

func (*Loader) Reconcile

func (s *Loader) Reconcile() (listeners common.Listeners)

Reconcile loop for reconciling listeners from different sources

func (*Loader) Register

func (s *Loader) Register(loader common.ListenerLoader)

Register registers new listener reconciler

Directories

Path Synopsis
kind

Jump to

Keyboard shortcuts

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