context

package
v2.2.4+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetValues

func SetValues(holder ValueHolder, values ValueGroup)

SetValues ...

Types

type Actor

type Actor interface {
	MessageSender

	Start(context Context, arguments []interface{})
}

Actor ...

type ActorRegister

type ActorRegister interface {
	RegisterActor(actor Actor, arguments []interface{})
}

ActorRegister ...

type Context

type Context interface {
	MessageSender
	StateHolder
	ActorRegister
	ValueStore

	SetMessageSender(sender MessageSender)
	SetStateHolder(holder StateHolder)
	SetActorRegister(register ActorRegister)
	SetValueStore(store CopyableValueStore)
	Copy() Context
}

Context ...

type CopyableValueStore

type CopyableValueStore interface {
	ValueStore

	Copy() CopyableValueStore
}

CopyableValueStore ...

type DefaultContext

DefaultContext ...

func NewDefaultContext

func NewDefaultContext() *DefaultContext

NewDefaultContext ...

func (DefaultContext) Copy

func (context DefaultContext) Copy() Context

Copy ...

func (*DefaultContext) SetActorRegister

func (context *DefaultContext) SetActorRegister(register ActorRegister)

SetActorRegister ...

func (*DefaultContext) SetMessageSender

func (context *DefaultContext) SetMessageSender(sender MessageSender)

SetMessageSender ...

func (*DefaultContext) SetStateHolder

func (context *DefaultContext) SetStateHolder(holder StateHolder)

SetStateHolder ...

func (*DefaultContext) SetValueStore

func (context *DefaultContext) SetValueStore(store CopyableValueStore)

SetValueStore ...

type DefaultValueStore

type DefaultValueStore map[string]interface{}

DefaultValueStore ...

func (DefaultValueStore) Copy

Copy ...

func (DefaultValueStore) SetValue

func (store DefaultValueStore) SetValue(name string, value interface{})

SetValue ...

func (DefaultValueStore) Value

func (store DefaultValueStore) Value(name string) (value interface{}, ok bool)

Value ...

func (DefaultValueStore) ValuesNames

func (store DefaultValueStore) ValuesNames() mapset.Set

ValuesNames ...

type Message

type Message struct {
	Name      string
	Arguments []interface{}
}

Message ...

type MessageSender

type MessageSender interface {
	SendMessage(message Message)
}

MessageSender ...

type State

type State struct {
	Name      string
	Arguments []interface{}
}

State ...

type StateHolder

type StateHolder interface {
	SetState(state State) error
}

StateHolder ...

type ValueGroup

type ValueGroup map[string]interface{}

ValueGroup ...

func ZipValues

func ZipValues(parameters []string, arguments []interface{}) ValueGroup

ZipValues ...

type ValueHolder

type ValueHolder interface {
	SetValue(name string, value interface{})
}

ValueHolder ...

type ValueStore

type ValueStore interface {
	ValueHolder

	ValuesNames() mapset.Set
	Value(name string) (value interface{}, ok bool)
}

ValueStore ...

Jump to

Keyboard shortcuts

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