runtime

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: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SMTypeBasic        = "BASIC"
	SMTypeSubscription = "SUBSCRIPTION"

	// state machine required fileds.
	SMFieldType     = "type"
	SMFieldOwner    = "owner"
	SMFieldSource   = "source"
	SMFieldTemplate = "template"
)

Variables

View Source
var (
	ErrInvalidParams       = errors.New("invalid params")
	ErrInvalidTQLKey       = errors.New("invalid TQL key")
	ErrSubscriptionInvalid = errors.New("invalid subscription")
)

Functions

func NewManager added in v0.3.0

func NewManager(ctx context.Context, resourceManager types.ResourceManager, dispatcher dispatch.Dispatcher) (types.Manager, error)

func NewResources added in v0.4.1

func NewResources(
	searchClient *search.Service,
	tseriesClient tseries.TimeSerier,
	repoClient repository.IRepository) types.ResourceManager

Types

type Container

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

func NewContainer added in v0.3.0

func NewContainer(ctx context.Context, id string, mgr *Manager) *Container

func (*Container) Add added in v0.3.0

func (c *Container) Add(machine state.Machiner)

func (*Container) Close added in v0.4.1

func (c *Container) Close()

func (*Container) Get added in v0.3.0

func (c *Container) Get(stateID string) (machine state.Machiner, has bool)

func (*Container) Load added in v0.4.1

func (c *Container) Load(ctx context.Context, stateID string) (machine state.Machiner, err error)

func (*Container) MakeMachine added in v0.4.1

func (c *Container) MakeMachine(en *dao.Entity) (machine state.Machiner, err error)

func (*Container) Remove added in v0.3.0

func (c *Container) Remove(stateID string)

type Manager added in v0.3.0

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

func (*Manager) EscapedEntities added in v0.3.0

func (m *Manager) EscapedEntities(expression string) []string

func (*Manager) HandleMessage added in v0.4.1

func (m *Manager) HandleMessage(ctx context.Context, msgCtx message.Context) error

func (*Manager) Resource added in v0.4.1

func (m *Manager) Resource() types.ResourceManager

Resource return resource manager.

func (*Manager) Shutdown added in v0.3.0

func (m *Manager) Shutdown() error

func (*Manager) Start added in v0.3.0

func (m *Manager) Start() error

type WatchKey added in v0.3.0

type WatchKey = mapper.WatchKey

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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