runtime

package
v1.36.0 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoCredentials    = errors.New("no credentials found")
	ErrValidationFailed = errors.New("credential validation failed")
)

Functions

This section is empty.

Types

type Context

type Context struct {
	Logger           *zerolog.Logger
	Viper            *viper.Viper
	ClientFactory    client.Factory
	Settings         *settings.Settings
	Credentials      *credentials.Credentials
	EnvironmentSet   *environments.EnvironmentSet
	TenantContext    *tenantctx.EnvironmentContext
	ResolvedRegistry settings.ResolvedRegistry
	Workflow         WorkflowRuntime

	OrgID                string
	DerivedWorkflowOwner string
	// InvocationDir is the working directory at the time the CLI was invoked,
	// before any os.Chdir calls made by SetExecutionContext.
	InvocationDir string
}

func NewContext

func NewContext(logger *zerolog.Logger, viper *viper.Viper) *Context

func (*Context) AttachCredentials

func (ctx *Context) AttachCredentials(validationCtx context.Context, skipValidation bool) error

func (*Context) AttachEnvironmentSet

func (ctx *Context) AttachEnvironmentSet() error

func (*Context) AttachResolvedRegistry added in v1.11.0

func (ctx *Context) AttachResolvedRegistry() error

AttachResolvedRegistry resolves the deployment-registry from workflow settings against the tenant context registries. Must be called after AttachSettings and AttachTenantContext.

func (*Context) AttachSettings

func (ctx *Context) AttachSettings(cmd *cobra.Command, validateDeployRPC bool) error

func (*Context) AttachTenantContext added in v1.8.0

func (ctx *Context) AttachTenantContext(validationCtx context.Context) error

AttachTenantContext loads the user context for the current environment. If the manifest is missing, it is fetched from the service first.

func (*Context) FinalizeDeferredWorkflowOwner added in v1.12.0

func (ctx *Context) FinalizeDeferredWorkflowOwner(cmd *cobra.Command) error

FinalizeDeferredWorkflowOwner fills workflow owner when settings load deferred it (non-empty deployment-registry). Call after AttachResolvedRegistry.

func (*Context) TryAttachCredentials added in v1.36.0

func (ctx *Context) TryAttachCredentials()

TryAttachCredentials silently loads credentials from the environment or disk without validation, prompting, or failing. It is used for commands that do not require authentication so their telemetry events can still be attributed to the logged-in user; telemetry is skipped when no usable credentials exist.

func (*Context) ValidateOnchainRegistryRPC added in v1.14.0

func (ctx *Context) ValidateOnchainRegistryRPC() error

ValidateOnchainRegistryRPC validates the deployment RPC URL when the resolved registry is on-chain. It is a no-op for off-chain (private) registries. A nil resolved registry is treated as on-chain (the default). Must be called after AttachResolvedRegistry.

type WorkflowRuntime

type WorkflowRuntime struct {
	ID       string
	Language string
}

Jump to

Keyboard shortcuts

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