hub

package
v0.0.0-...-8923af6 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateConsumer

func CreateConsumer(group goka.Group, inputStream, outputStream goka.Stream, execs ...Executable) shared.DispatcherFunc

func CreateConsumerDefaults

func CreateConsumerDefaults(descr shared.EntityDescriptor, execs ...Executable) shared.DispatcherFunc

receives dedicated hub messages, sends hub messages

func IsNodeInvisible

func IsNodeInvisible(arg interface{}) bool

func SetVisibility

func SetVisibility(visible bool) shared.Handler

Types

type ActionData

type ActionData struct {
	EntityDescriptor shared.EntityDescriptor
	Sender           string
	Operation        shared.Operation
	Conditions       shared.EvalFuncs
	ErrorHandlers    shared.ErrorHandlers
	Then             shared.Handlers
	Else             shared.Handlers
	Or               []ActionData
	And              []ActionData
	Not              []ActionData
}

func (*ActionData) Match

func (p *ActionData) Match(m *shared.HubContext) bool

type Alternative

type Alternative interface {
	Else(fns ...shared.Handler) Catchable
	Catch(fn shared.ErrorHandler) Executable
}

type Catchable

type Catchable interface {
	Catch(fn shared.ErrorHandler) Executable
}

type Combinable

type Combinable interface {
	Or(or ...Combinable) Combinable
	And(or ...Combinable) Combinable
	Not(not ...Combinable) Combinable
}

func From

func From(sender string) Combinable

func OnNodeCreated

func OnNodeCreated() Combinable

func OnNodeDeleted

func OnNodeDeleted() Combinable

func OnNodeUpdated

func OnNodeUpdated() Combinable

func With

func With(fn shared.EvalFunc) Combinable

type Executable

type Executable interface {
	Execute(ctx goka.Context, m *shared.HubContext) shared.ChainHandledState
	SetDescriptor(descr shared.EntityDescriptor) Executable
}

type Proceedable

type Proceedable interface {
	Then(fns ...shared.Handler) Alternative
}

func If

func If(comb Combinable) Proceedable

type Selectable

type Selectable interface {
	From(sender string) Combinable
	With(fn shared.EvalFunc) Combinable
	OnNodeCreated() Combinable
	OnNodeUpdated() Combinable
	OnNodeDeleted() Combinable
}

Jump to

Keyboard shortcuts

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