environment

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidTQLKey = errors.New("invalid TQL key")
)

Functions

This section is empty.

Types

type ActorEnv

type ActorEnv struct {
	Mappers   map[string]mapper.Mapper
	Tentacles []mapper.Tentacler
}

type CleanFunc

type CleanFunc func() []string

type CleanHandler

type CleanHandler func() []string

type Effect

type Effect struct {
	StateID        string
	MapperID       string
	EffectStateIDs []string
}

type Environment

type Environment struct {
	// contains filtered or unexported fields
}

func (*Environment) GetStateEnv

func (env *Environment) GetStateEnv(stateID string) ActorEnv

GetActorEnv returns Actor Environments.

func (*Environment) OnMapperChanged

func (env *Environment) OnMapperChanged(et dao.EnventType, m dao.Mapper) (Effect, error)

OnMapperChanged respond for mapper.

func (*Environment) StoreMappers

func (env *Environment) StoreMappers(mappers []dao.Mapper) []dao.Mapper

type IEnvironment

type IEnvironment interface {
	GetStateEnv(string) ActorEnv
	StoreMappers([]dao.Mapper) []dao.Mapper
	OnMapperChanged(dao.EnventType, dao.Mapper) (Effect, error)
}

func NewEnvironment

func NewEnvironment() IEnvironment

NewEnvironment returns *Environment.

type MapperCache

type MapperCache struct {
	// contains filtered or unexported fields
}

cache for state machine.

type StateCache

type StateCache struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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