{"modulePath":"github.com/AliceO2Group/Control","version":"v1.51.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package environment\n\nPackage environment defines Environment, environment.Manager and other types and methods related to handling O² environments.\n\n## Variables\n\n```go\nvar StartActivityParameterKeys = []string{\n\t\"fill_info_fill_number\",\n\t\"fill_info_filling_scheme\",\n\t\"fill_info_beam_type\",\n\t\"fill_info_stable_beams_start_ms\",\n\t\"fill_info_stable_beams_end_ms\",\n\t\"run_number\",\n\t\"run_type\",\n\t\"run_start_time_ms\",\n\t\"run_end_time_ms\",\n\t\"lhc_period\",\n\t\"pdp_beam_type\",\n\t\"pdp_override_run_start_time\",\n\t\"original_run_number\",\n}\n```\n\n```go\nvar StopActivityParameterKeys = []string{\n\t\"fill_info_fill_number\",\n\t\"fill_info_filling_scheme\",\n\t\"fill_info_beam_type\",\n\t\"fill_info_stable_beams_start_ms\",\n\t\"fill_info_stable_beams_end_ms\",\n\t\"run_end_time_ms\",\n}\n```\n\n## Functions\n\n```go\nfunc HandleFailedGoError(err error, env *Environment)\n```\n\n```go\nfunc JSONSliceToSlice(payload string) (slice []string, err error)\n```\n\n```go\nfunc NewEnvGoErrorEvent(env *Environment, err string) *pb.Ev_EnvironmentEvent\n```\n\n```go\nfunc SliceToJSONSlice(slice []string) (payload string, err error)\n```\n\n## Types\n\n```go\ntype ConfigureTransition struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype DeployTransition struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype Environment struct {\n\tMu sync.RWMutex\n\n\tSm *fsm.FSM\n\n\tGlobalDefaults  gera.Map[string, string] // From Consul\n\tGlobalVars      gera.Map[string, string] // From Consul\n\tUserVars        gera.Map[string, string] // From user input\n\tBaseConfigStack map[string]string        // Exclusively from Consul, already flattened for performance\n\n\tPublic       bool   // From workflow or user\n\tDescription  string // From workflow\n\tWorkflowPath string // From workflow load\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (env *Environment) CreatedWhen() time.Time\n```\n\n```go\nfunc (env *Environment) CurrentState() string\n```\n\n```go\nfunc (env *Environment) CurrentTransition() string\n```\n\n```go\nfunc (env *Environment) GetActiveDetectors() (response system.IDMap)\n```\n\n```go\nfunc (env *Environment) GetAllHosts() []string\n```\n\n```go\nfunc (env *Environment) GetCurrentRunNumber() (rn uint32)\n```\n\n```go\nfunc (env *Environment) GetFLPs() []string\n```\n\n```go\nfunc (env *Environment) GetId() uid.ID\n```\n\n```go\nfunc (env *Environment) GetKV(path, key string) string\n```\n\n```go\nfunc (env *Environment) GetLastRequestUser() *pb.User\n```\n\n```go\nfunc (env *Environment) GetPath() string\n```\n\n```go\nfunc (env *Environment) GetRunType() runtype.RunType\n```\n\n```go\nfunc (env *Environment) GetVarsAsString() string\n```\n\n```go\nfunc (env *Environment) GetWorkflowInfo() *pb.WorkflowTemplateInfo\n```\n\n```go\nfunc (env *Environment) Id() uid.ID\n```\n\n```go\nfunc (env *Environment) IsSafeToStop() bool\n```\n\n```go\nfunc (env *Environment) NotifyEvent(e event.DeviceEvent)\n```\n\n```go\nfunc (env *Environment) QueryRoles(pathSpec string) (rs []workflow.Role)\n```\n\n```go\nfunc (env *Environment) SetLastRequestUser(lastRequestUser *pb.User)\n```\n\n```go\nfunc (env *Environment) TryTransition(t Transition) (err error)\n```\n\n```go\nfunc (env *Environment) Workflow() workflow.Role\n```\n\n```go\ntype GoErrorTransition struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype Manager struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc ManagerInstance() *Manager\n```\n\n```go\nfunc NewEnvManager(tm *task.Manager, incomingEventCh chan event.Event) *Manager\n```\n\n```go\nfunc (envs *Manager) CreateAutoEnvironment(workflowPath string, userVars map[string]string, newId uid.ID, sub Subscription)\n```\nFIXME: this function should be deduplicated with CreateEnvironment so detector resource matching works correctly\n\n```go\nfunc (envs *Manager) CreateEnvironment(workflowPath string, userVars map[string]string, public bool, newId uid.ID, autoTransition bool) (resultEnvId uid.ID, resultErr error)\n```\n\n```go\nfunc (envs *Manager) Environment(environmentId uid.ID) (env *Environment, err error)\n```\n\n```go\nfunc (envs *Manager) GetActiveDetectors() system.IDMap\n```\n\n```go\nfunc (envs *Manager) Ids() (keys []uid.ID)\n```\n\n```go\nfunc (envs *Manager) NotifyIntegratedServiceEvent(event event.IntegratedServiceEvent)\n```\n\n```go\nfunc (envs *Manager) TeardownEnvironment(environmentId uid.ID, force bool) error\n```\n\n```go\ntype ResetTransition struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype StartActivityTransition struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype StopActivityTransition struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype Subscription interface {\n\tUnsubscribe()\n\tGetFeed() chan *pb.Event\n\tSend(event.Event)\n\tErr() \u003c-chan error\n}\n```\n\n```go\nfunc SubscribeToStream(ch chan *pb.Event) Subscription\n```\n\n```go\ntype Transition interface {\n\t// contains filtered or unexported methods\n}\n```\n\n```go\nfunc MakeTransition(taskman *task.Manager, optype pb.ControlEnvironmentRequest_Optype) Transition\n```\n\n```go\nfunc NewConfigureTransition(taskman *task.Manager) Transition\n```\n\n```go\nfunc NewDeployTransition(taskman *task.Manager, addRoles []string, removeRoles []string) Transition\n```\n\n```go\nfunc NewGoErrorTransition(taskman *task.Manager) Transition\n```\n\n```go\nfunc NewResetTransition(taskman *task.Manager) Transition\n```\n\n```go\nfunc NewStartActivityTransition(taskman *task.Manager) Transition\n```\n\n```go\nfunc NewStopActivityTransition(taskman *task.Manager) Transition\n```\n\n```go\ntype WorkflowPublicInfo struct {\n\tIsPublic    bool\n\tName        string\n\tDescription string\n}\n```\n\n","path":"github.com/AliceO2Group/Control/core/environment","name":"environment","synopsis":"Package environment defines Environment, environment.Manager and other types and methods related to handling O² environments.","isRedistributable":true}
