processing

package
v0.0.0-...-1a56975 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

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.

func (*Dispatcher) Handle

func (d *Dispatcher) Handle(e resource.Event)

Handle implements Handler

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

Add a new handler for the given Collection

func (*DispatcherBuilder) Build

func (d *DispatcherBuilder) Build() *Dispatcher

Build a Dispatcher

type Handler

type Handler interface {
	Handle(e resource.Event)
}

Handler handles an incoming resource event.

func HandlerFromFn

func HandlerFromFn(fn func(e resource.Event)) Handler

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

Jump to

Keyboard shortcuts

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