execution

package
v0.0.53 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2026 License: Apache-2.0 Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package execution is an unstable provider client for Stacklok hosts. No compatibility promise.

Index

Constants

View Source
const (
	CodeInvalidArgument   = kubernetes.CodeInvalidArgument
	CodeUnauthenticated   = kubernetes.CodeUnauthenticated
	CodePermissionDenied  = kubernetes.CodePermissionDenied
	CodeNotFound          = kubernetes.CodeNotFound
	CodeAlreadyExists     = kubernetes.CodeAlreadyExists
	CodeConflict          = kubernetes.CodeConflict
	CodeVersionMismatch   = kubernetes.CodeVersionMismatch
	CodeDirectoryNotEmpty = kubernetes.CodeDirectoryNotEmpty
	CodeNotReady          = kubernetes.CodeNotReady
	CodeFenceUnknown      = kubernetes.CodeFenceUnknown
	CodeResourceExhausted = kubernetes.CodeResourceExhausted
	CodeInternal          = kubernetes.CodeInternal

	PurposeSession              = kubernetes.PurposeSession
	CapabilityFilesystem        = kubernetes.CapabilityFilesystem
	CapabilityForegroundCommand = kubernetes.CapabilityForegroundCommand
	MinRunTTL                   = kubernetes.MinRunTTL
	MaxRunTTL                   = kubernetes.MaxRunTTL
	DefaultRunTTL               = kubernetes.DefaultRunTTL
	DefaultRenewInterval        = kubernetes.DefaultRenewInterval
)

Protocol constants.

Variables

View Source
var (
	ErrExecutorServicesMissing = client.ErrExecutorServicesMissing
	ErrOutcomeUnknown          = executorclient.ErrOutcomeUnknown
	ErrStorageTimeout          = executorclient.ErrStorageTimeout
	ErrLimitExceeded           = executorclient.ErrLimitExceeded
)

Sentinel errors.

Functions

func AdmissionRefusal

func AdmissionRefusal(err error) (string, bool)

AdmissionRefusal explains an EnsureTemplate refusal.

Types

type AttachEnvironmentRequest

type AttachEnvironmentRequest = kubernetes.AttachEnvironmentRequest

AttachEnvironmentRequest names an environment.

type AttachEnvironmentResponse

type AttachEnvironmentResponse = kubernetes.AttachEnvironmentResponse

AttachEnvironmentResponse reports an attach.

type Client

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

Client is a connection.

func New

func New(endpoint string, tlsConfig *tls.Config) (*Client, error)

New connects over mTLS.

func NewWithTLSFiles

func NewWithTLSFiles(endpoint string, files TLSFiles) (*Client, error)

NewWithTLSFiles connects with reloadable files.

func (*Client) AbortReference

func (c *Client) AbortReference(ctx context.Context, req ReferenceRequest) error

AbortReference drops the reference.

func (*Client) AcquireRun

func (c *Client) AcquireRun(ctx context.Context, req RunClaimRequest) (RunClaim, error)

AcquireRun claims a run.

func (*Client) Attach

Attach reattaches an environment.

func (*Client) CheckExecutorServices

func (c *Client) CheckExecutorServices(ctx context.Context) error

CheckExecutorServices may return ErrExecutorServicesMissing.

func (*Client) Close

func (c *Client) Close()

Close disconnects.

func (*Client) Commands

func (c *Client) Commands(current RequestContextFunc) tool.CommandRunner

Commands is the run's commands. Stale claims refuse as in Workspace.

func (*Client) CommitReference

func (c *Client) CommitReference(ctx context.Context, req ReferenceRequest) error

CommitReference publishes the reference.

func (*Client) EnsureTemplate

func (c *Client) EnsureTemplate(
	ctx context.Context,
	binding string,
	id string,
	revision string,
	owner Owner,
	operationID string,
	capabilities ...string,
) (EnsureEnvironmentResponse, error)

EnsureTemplate creates a pending reference.

func (*Client) ReleaseRun

func (c *Client) ReleaseRun(ctx context.Context, req RunClaimRequest) error

ReleaseRun releases a claim.

func (*Client) RenewRun

func (c *Client) RenewRun(ctx context.Context, req RunClaimRequest) (RunClaim, error)

RenewRun renews a claim.

func (*Client) RunTLSReload

func (c *Client) RunTLSReload(ctx context.Context, interval time.Duration)

RunTLSReload reloads files periodically.

func (*Client) Workspace

func (c *Client) Workspace(current RequestContextFunc) tool.Workspace

Workspace is the run's files. A Refusal with CodeUnauthenticated and Retryable means a stale claim: RenewRun, then retry reads.

type EnsureEnvironmentResponse

type EnsureEnvironmentResponse = kubernetes.EnsureEnvironmentResponse

EnsureEnvironmentResponse reports an ensure.

type EnvironmentRef

type EnvironmentRef = kubernetes.EnvironmentRef

EnvironmentRef pins an environment.

type Error

type Error = kubernetes.Error

Error is a refusal.

func Refusal

func Refusal(err error) *Error

Refusal returns the provider's refusal of a Workspace or Commands call, else nil.

type ErrorCode

type ErrorCode = kubernetes.ErrorCode

ErrorCode classifies an Error.

type Owner

type Owner = kubernetes.Owner

Owner identifies a user.

type ReferenceRequest

type ReferenceRequest = kubernetes.ReferenceRequest

ReferenceRequest names a reference.

type RequestContext

type RequestContext = kubernetes.RequestContext

RequestContext authorizes a call.

type RequestContextFunc

type RequestContextFunc = client.RequestContextFunc

RequestContextFunc yields RequestContext.

type RunClaim

type RunClaim = kubernetes.RunClaim

RunClaim grants a run.

type RunClaimRequest

type RunClaimRequest = kubernetes.RunClaimRequest

RunClaimRequest names a claim.

type TLSFiles

type TLSFiles = client.TLSFiles

TLSFiles names mTLS files.

Jump to

Keyboard shortcuts

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