eventhandler

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventHandler

type EventHandler interface {
	Handler()
	Start(ctx context.Context)
}

func NewEventHandler

func NewEventHandler(ctx context.Context, name string, loader func(context.Context) error) EventHandler

type EventHandlers

type EventHandlers struct {
	Store store.Storer[OnChangeFn]
}

type Informers

type Informers struct {
	Store store.Storer[*EventHandlers]
}

Informers (handle the path) -> eventhandler handle the name

func NewInformers

func NewInformers() *Informers

func (*Informers) AddEventHandler

func (r *Informers) AddEventHandler(path, name string, handler OnChangeFn) error

type OnChangeFn

type OnChangeFn func()

Jump to

Keyboard shortcuts

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