environment

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2019 License: GPL-3.0 Imports: 17 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 Environment

type Environment struct {
	Mu sync.RWMutex
	Sm *fsm.FSM
	// 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) GetPath

func (env *Environment) GetPath() string

func (*Environment) Id

func (env *Environment) Id() uuid.UUID

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) *Manager

func (*Manager) CreateEnvironment

func (envs *Manager) CreateEnvironment(workflowPath string) (uuid.UUID, error)

func (*Manager) Environment

func (envs *Manager) Environment(environmentId uuid.UUID) (env *Environment, err error)

func (*Manager) Ids

func (envs *Manager) Ids() (keys []uuid.UUID)

func (*Manager) TeardownEnvironment

func (envs *Manager) TeardownEnvironment(environmentId uuid.UUID) 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 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, addRoles []string, removeRoles []string, reconfigureAll bool) 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