environment

package
v0.26.2 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2021 License: GPL-3.0 Imports: 27 Imported by: 0

Documentation

Overview

Package environment defines Environment, environment.Manager and other types and methods related to handling O² environments.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigureTransition

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

type DeployTransition added in v0.24.80

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

type Environment

type Environment struct {
	Mu sync.RWMutex

	Sm *fsm.FSM

	GlobalDefaults gera.StringMap // From Consul
	GlobalVars     gera.StringMap // From Consul
	UserVars       gera.StringMap // From user input

	Public bool // From workflow or user
	// contains filtered or unexported fields
}

func (*Environment) CreatedWhen

func (env *Environment) CreatedWhen() time.Time

func (*Environment) CurrentState

func (env *Environment) CurrentState() string

func (*Environment) GetCurrentRunNumber added in v0.8.0

func (env *Environment) GetCurrentRunNumber() (rn uint32)

func (*Environment) GetFLPs added in v0.20.80

func (env *Environment) GetFLPs() []string

func (*Environment) GetPath

func (env *Environment) GetPath() string

func (*Environment) GetRunType added in v0.22.81

func (env *Environment) GetRunType() string

func (*Environment) Id

func (env *Environment) Id() uid.ID

func (*Environment) IsSafeToStop added in v0.12.0

func (env *Environment) IsSafeToStop() bool

func (*Environment) NotifyEvent added in v0.16.0

func (env *Environment) NotifyEvent(e event.DeviceEvent)

func (*Environment) QueryRoles

func (env *Environment) QueryRoles(pathSpec string) (rs []workflow.Role)

func (*Environment) TryTransition

func (env *Environment) TryTransition(t Transition) (err error)

func (*Environment) Workflow

func (env *Environment) Workflow() workflow.Role

type Manager

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

func NewEnvManager

func NewEnvManager(tm *task.Manager, incomingEventCh <-chan event.Event) *Manager

func (*Manager) CreateAutoEnvironment added in v0.19.80

func (envs *Manager) CreateAutoEnvironment(workflowPath string, userVars map[string]string, sub Subscription)

func (*Manager) CreateEnvironment

func (envs *Manager) CreateEnvironment(workflowPath string, userVars map[string]string) (uid.ID, error)

func (*Manager) Environment

func (envs *Manager) Environment(environmentId uid.ID) (env *Environment, err error)

func (*Manager) Ids

func (envs *Manager) Ids() (keys []uid.ID)

func (*Manager) TeardownEnvironment

func (envs *Manager) TeardownEnvironment(environmentId uid.ID, force bool) error

type ResetTransition

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

type StartActivityTransition

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

type StopActivityTransition

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

type Subscription added in v0.19.80

type Subscription interface {
	Unsubscribe()
	GetFeed() chan *pb.Event
	Send(event.Event)
	Err() <-chan error
}

func SubscribeToStream added in v0.19.80

func SubscribeToStream(ch chan *pb.Event) Subscription

type Transition

type Transition interface {
	// contains filtered or unexported methods
}

func MakeTransition

func MakeTransition(taskman *task.Manager, optype pb.ControlEnvironmentRequest_Optype) Transition

func NewConfigureTransition

func NewConfigureTransition(taskman *task.Manager) Transition

func NewDeployTransition added in v0.24.80

func NewDeployTransition(taskman *task.Manager, addRoles []string, removeRoles []string) Transition

func NewResetTransition

func NewResetTransition(taskman *task.Manager) Transition

func NewStartActivityTransition

func NewStartActivityTransition(taskman *task.Manager) Transition

func NewStopActivityTransition

func NewStopActivityTransition(taskman *task.Manager) Transition

Jump to

Keyboard shortcuts

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