events

package
v0.0.0-...-e47a0d2 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ListenerStoppedErr = errors.New("listener closed")

Functions

This section is empty.

Types

type Emitter

type Emitter interface {
	Send(Event)
}

type Event

type Event interface{}

type EventBus

type EventBus interface {
	Emitter
	ListenerFactory
}

func NewEventBus

func NewEventBus(bufferSize uint) (EventBus, error)

type Listener

type Listener interface {
	Recv() <-chan Event
	Close()
}

func NewNeverListener

func NewNeverListener() Listener

type ListenerFactory

type ListenerFactory interface {
	Subscribe(...Predicate) Listener
}

type Op

type Op int
const (
	Create Op = iota
	Update
	Delete
)

type Predicate

type Predicate = func(event Event) bool

type ResourceChangedEvent

type ResourceChangedEvent struct {
	Operation Op
	Type      model.ResourceType
	Key       model.ResourceKey
	TenantID  string
}

type TriggerInsightsComputationEvent

type TriggerInsightsComputationEvent struct {
	TenantID string
}

Jump to

Keyboard shortcuts

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