runtimeevent

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 Generator

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

func NewGenerator

func NewGenerator(getResources func(ctx context.Context) (*iri.RuntimeResources, error), opts GeneratorOptions) Generator

type GeneratorOptions

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

type Handler

type Handler interface {
	UpdateResources(event *UpdateResourcesEvent)
}

type HandlerFuncs

type HandlerFuncs struct {
	UpdateResourcesFunc func(event *UpdateResourcesEvent)
}

func (HandlerFuncs) UpdateResources

func (f HandlerFuncs) UpdateResources(event *UpdateResourcesEvent)

type HandlerRegistration

type HandlerRegistration interface {
	Remove() error
}

type Source

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

type UpdateResourcesEvent

type UpdateResourcesEvent struct {
	ResourcesOld *iri.RuntimeResources
	ResourcesNew *iri.RuntimeResources
}

Jump to

Keyboard shortcuts

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