Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dispatcher ¶
type Dispatcher struct {
// contains filtered or unexported fields
}
Dispatcher is a Handler that can dispatch events to other Handlers, based on Collection.
type DispatcherBuilder ¶
type DispatcherBuilder struct {
// contains filtered or unexported fields
}
DispatcherBuilder builds Dispatchers
func NewDispatcherBuilder ¶
func NewDispatcherBuilder() *DispatcherBuilder
NewDispatcherBuilder returns a new dispatcher dispatcher
func (*DispatcherBuilder) Add ¶
func (d *DispatcherBuilder) Add(t resource.Collection, h Handler)
Add a new handler for the given Collection
func (*DispatcherBuilder) Build ¶
func (d *DispatcherBuilder) Build() *Dispatcher
Build a Dispatcher
type Handler ¶
Handler handles an incoming resource event.
func HandlerFromFn ¶
HandlerFromFn returns a new Handler, based on the Handler function.
type Listener ¶
type Listener interface {
CollectionChanged(c resource.Collection)
}
Listener gets notified when resource of a given collection has changed.
func ListenerFromFn ¶
func ListenerFromFn(fn func(c resource.Collection)) Listener
ListenerFromFn creates a listener based on the given function
Click to show internal directories.
Click to hide internal directories.