Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Emitter

type Emitter interface {
	Send(Event)
}

type Event

type Event interface{}

type EventBus

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

func NewEventBus

func NewEventBus() *EventBus

func (*EventBus) New

func (b *EventBus) New() Listener

func (*EventBus) Send

func (b *EventBus) Send(event Event)

type Listener

type Listener interface {
	Recv(stop <-chan struct{}) (Event, error)
}

type ListenerFactory

type ListenerFactory interface {
	New() Listener
}

type Op

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

type ResourceChangedEvent

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