env

package
v1.0.0-alpha1.0...-2e0dbe4 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ActionOrchestrationIDVar                 = "OSVC_ACTION_ORCHESTRATION_ID"
	ActionOriginVar                          = "OSVC_ACTION_ORIGIN"
	ActionOriginUser            ActionOrigin = "user"
	ActionOriginDaemonAPI       ActionOrigin = "daemon/api"
	ActionOriginDaemonMonitor   ActionOrigin = "daemon/monitor"
	ActionOriginDaemonScheduler ActionOrigin = "daemon/scheduler"

	ParentSessionIDVar = "OSVC_PARENT_SESSION_UUID"
	NameVar            = "OSVC_NAME"
	NamespaceVar       = "OSVC_NAMESPACE"
	KindVar            = "OSVC_KIND"
	ContextVar         = "OSVC_CONTEXT"
)

Functions

func Context

func Context() string

Context returns the identifier of a remote cluster endpoint and credentials configuration via the OSVC_CONTEXT variable.

func HasDaemonMonitorOrigin

func HasDaemonMonitorOrigin() bool

HasDaemonMonitorOrigin returns true if the environment variable OSVC_ACTION_ORIGIN is set to "daemon/imon". The opensvc daemon sets this variable on every command it executes.

func HasDaemonOrigin

func HasDaemonOrigin() bool

HasDaemonOrigin returns true if the environment variable OSVC_ACTION_ORIGIN is set to "daemon". The opensvc daemon sets this variable on every command it executes.

func Kind

func Kind() string

Kind returns the object kind filter forced via the OSVC_NAMESPACE environment variable.

func Namespace

func Namespace() string

Namespace returns the namespace filter forced via the OSVC_NAMESPACE environment variable.

func OriginSetenvArg

func OriginSetenvArg(s ActionOrigin) string

OriginSetenvArg returns the arg to pass to environment variable setter functions to hint the called CRM command was launched from a daemon policy.

func ParentSessionIDSetenvArg

func ParentSessionIDSetenvArg() string

ParentSessionIDSetenvArg returns the arg to pass to environment variable setter functions to hint the called CRM command was launched with a different session id.

Types

type ActionOrigin

type ActionOrigin string

func Origin

func Origin() ActionOrigin

Origin returns the action origin using a env var that the daemon sets when executing a CRM action.

Jump to

Keyboard shortcuts

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