processing

package
v0.0.0-...-4638b96 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2020 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.

Jump to

Keyboard shortcuts

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