instanceevent

package
v0.0.0-...-66691d1 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateEvent

type CreateEvent struct {
	Object *iri.Instance
}

type DeleteEvent

type DeleteEvent struct {
	Object *iri.Instance
}

type EnqueueFunc

type EnqueueFunc struct {
	EnqueueFunc func()
}

func (EnqueueFunc) Enqueue

func (n EnqueueFunc) Enqueue()

type Generator

type Generator interface {
	Source
	healthz.HealthChecker
	manager.Runnable
}

func NewGenerator

func NewGenerator(list func(ctx context.Context) ([]*iri.Instance, error), opts GeneratorOptions) Generator

type GeneratorOptions

type GeneratorOptions struct {
	ChannelCapacity int
	RelistPeriod    time.Duration
	RelistThreshold time.Duration
}

type GenericEvent

type GenericEvent struct {
	Object *iri.Instance
}

type Handler

type Handler interface {
	Create(event CreateEvent)
	Update(event UpdateEvent)
	Delete(event DeleteEvent)
	Generic(event GenericEvent)
}

type HandlerFuncs

type HandlerFuncs struct {
	CreateFunc  func(event CreateEvent)
	UpdateFunc  func(event UpdateEvent)
	DeleteFunc  func(event DeleteEvent)
	GenericFunc func(event GenericEvent)
}

func (HandlerFuncs) Create

func (e HandlerFuncs) Create(event CreateEvent)

func (HandlerFuncs) Delete

func (e HandlerFuncs) Delete(event DeleteEvent)

func (HandlerFuncs) Generic

func (e HandlerFuncs) Generic(event GenericEvent)

func (HandlerFuncs) Update

func (e HandlerFuncs) Update(event UpdateEvent)

type HandlerRegistration

type HandlerRegistration interface {
	Remove() error
}

type Listener

type Listener interface {
	Enqueue()
}

type ListenerRegistration

type ListenerRegistration interface{}

type Source

type Source interface {
	AddHandler(handler Handler) (HandlerRegistration, error)
}

type UpdateEvent

type UpdateEvent struct {
	ObjectOld *iri.Instance
	ObjectNew *iri.Instance
}

Jump to

Keyboard shortcuts

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