Help us shape the future of Go! Take the 2026 Go Developer Survey

agentupgrades

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const APIName = "kube-workspaces"

APIName is the name of the API as defined in the design.

View Source
const APIVersion = "1.0.0"

APIVersion is the version of the API as defined in the design.

View Source
const ServiceName = "agentupgrades"

ServiceName is the name of the service as defined in the design. This is the same value that is set in the endpoint request contexts under the ServiceKey key.

Variables

View Source
var MethodNames = [5]string{"availability", "start", "status", "cancel", "rollback"}

MethodNames lists the service method names as defined in the design. These are the same values that are set in the endpoint request contexts under the MethodKey key.

Functions

func NewAvailabilityEndpoint

func NewAvailabilityEndpoint(s Service) goa.Endpoint

NewAvailabilityEndpoint returns an endpoint function that calls the method "availability" of service "agentupgrades".

func NewCancelEndpoint

func NewCancelEndpoint(s Service) goa.Endpoint

NewCancelEndpoint returns an endpoint function that calls the method "cancel" of service "agentupgrades".

func NewRollbackEndpoint

func NewRollbackEndpoint(s Service) goa.Endpoint

NewRollbackEndpoint returns an endpoint function that calls the method "rollback" of service "agentupgrades".

func NewStartEndpoint

func NewStartEndpoint(s Service) goa.Endpoint

NewStartEndpoint returns an endpoint function that calls the method "start" of service "agentupgrades".

func NewStatusEndpoint

func NewStatusEndpoint(s Service) goa.Endpoint

NewStatusEndpoint returns an endpoint function that calls the method "status" of service "agentupgrades".

func NewViewedAgentUpgradeAttempt

func NewViewedAgentUpgradeAttempt(res *AgentUpgradeAttempt, view string) *agentupgradesviews.AgentUpgradeAttempt

NewViewedAgentUpgradeAttempt initializes viewed result type AgentUpgradeAttempt from result type AgentUpgradeAttempt using the given view.

func NewViewedAgentUpgradeAvailability

func NewViewedAgentUpgradeAvailability(res *AgentUpgradeAvailability, view string) *agentupgradesviews.AgentUpgradeAvailability

NewViewedAgentUpgradeAvailability initializes viewed result type AgentUpgradeAvailability from result type AgentUpgradeAvailability using the given view.

Types

type AgentUpgradeAttempt

type AgentUpgradeAttempt struct {
	// Server-minted attempt identifier
	AttemptID     string
	Namespace     string
	WorkspaceName string
	WorkspaceUID  string
	// Controller-owned VM UID the reservation is bound to
	VMUID string
	// UID of the administrator that admitted the attempt
	ActorID string
	// Attempt lifecycle state
	State                            string
	TargetID                         string
	TargetManifestSha256             string
	ExpectedInstalledInventorySha256 string
	// Whether the admitted attempt may run the bounded reboot sequence
	AllowReboot bool
	// An administrator requested safe-boundary cancellation
	CancelRequested bool
	// Linked execution admission record (recording authorization)
	ExecutionID string
	// Protected attempt recording
	RecordingID string
	// Independently authorized recording link
	RecordingURL string
	// Canonical status URL for this attempt
	StatusURL string
	// Last reconciled guest journal sequence
	JournalSequence uint64
	// Pinned rollback predecessor target
	PredecessorTargetID *string
	// Pinned rollback predecessor manifest digest
	PredecessorManifestSha256 *string
	// Bounded machine-readable failure code
	ErrorCode *string
	// RFC3339 admission timestamp
	AdmittedAt          string
	StagingAt           *string
	PreparedAt          *string
	InstallingAt        *string
	AwaitingRebootAt    *string
	VerifyingAt         *string
	RollbackRequestedAt *string
	RollingBackAt       *string
	TerminalAt          *string
	UpdatedAt           string
}

AgentUpgradeAttempt is the result type of the agentupgrades service start method.

func NewAgentUpgradeAttempt

func NewAgentUpgradeAttempt(vres *agentupgradesviews.AgentUpgradeAttempt) *AgentUpgradeAttempt

NewAgentUpgradeAttempt initializes result type AgentUpgradeAttempt from viewed result type AgentUpgradeAttempt.

type AgentUpgradeAvailability

type AgentUpgradeAvailability struct {
	// Platform policy admits agent upgrades
	PolicyEnabled bool
	// Durable attempt/recording storage is ready
	StorageAvailable bool
	// Workspace resolves as an eligible running Windows VM
	WorkspaceEligible bool
	// Fresh authenticated guest inventory is available (guest integration)
	InventoryAvailable bool
	// A start request would be admitted right now
	Admissible bool
	// Why start would be denied; empty when admissible
	DenyReason string
	// Reservation-holding attempt for this VM, when present
	ActiveAttemptID *string
	// Resolved controller-owned VM UID, when eligible
	VMUID *string
}

AgentUpgradeAvailability is the result type of the agentupgrades service availability method.

func NewAgentUpgradeAvailability

func NewAgentUpgradeAvailability(vres *agentupgradesviews.AgentUpgradeAvailability) *AgentUpgradeAvailability

NewAgentUpgradeAvailability initializes result type AgentUpgradeAvailability from viewed result type AgentUpgradeAvailability.

type AgentUpgradeStartPayload

type AgentUpgradeStartPayload struct {
	Namespace string
	Name      string
	// Operator-approved immutable target
	TargetID string
	// Expected signed manifest digest for the target
	TargetManifestSha256 string
	// Client-observed VM UID; must match the current controller-owned UID
	ExpectedVMUID string
	// Client-observed execution revocation epoch
	ExpectedRevocationEpoch uint64
	// Client-observed installed inventory digest (re-verified before install)
	ExpectedInstalledInventorySha256 string
	// Client-chosen key; an identical replay returns the original attempt
	IdempotencyKey string
	// Permit the recorded bounded reboot sequence
	AllowReboot bool
}

AgentUpgradeStartPayload is the payload type of the agentupgrades service start method.

type AvailabilityPayload

type AvailabilityPayload struct {
	Namespace string
	Name      string
}

AvailabilityPayload is the payload type of the agentupgrades service availability method.

type CancelPayload

type CancelPayload struct {
	Namespace string
	Name      string
	AttemptID string
}

CancelPayload is the payload type of the agentupgrades service cancel method.

type Client

type Client struct {
	AvailabilityEndpoint goa.Endpoint
	StartEndpoint        goa.Endpoint
	StatusEndpoint       goa.Endpoint
	CancelEndpoint       goa.Endpoint
	RollbackEndpoint     goa.Endpoint
}

Client is the "agentupgrades" service client.

func NewClient

func NewClient(availability, start, status, cancel, rollback goa.Endpoint) *Client

NewClient initializes a "agentupgrades" service client given the endpoints.

func (*Client) Availability

func (c *Client) Availability(ctx context.Context, p *AvailabilityPayload) (res *AgentUpgradeAvailability, err error)

Availability calls the "availability" endpoint of the "agentupgrades" service. Availability may return the following errors:

  • "unauthorized" (type Unauthorized)
  • "forbidden" (type Forbidden)
  • "invalid" (type Invalid)
  • "not_found" (type NotFound)
  • "conflict" (type Conflict)
  • "unavailable" (type Unavailable)
  • error: internal error

func (*Client) Cancel

func (c *Client) Cancel(ctx context.Context, p *CancelPayload) (res *AgentUpgradeAttempt, err error)

Cancel calls the "cancel" endpoint of the "agentupgrades" service. Cancel may return the following errors:

  • "unauthorized" (type Unauthorized)
  • "forbidden" (type Forbidden)
  • "invalid" (type Invalid)
  • "not_found" (type NotFound)
  • "conflict" (type Conflict)
  • "unavailable" (type Unavailable)
  • error: internal error

func (*Client) Rollback

func (c *Client) Rollback(ctx context.Context, p *RollbackPayload) (res *AgentUpgradeAttempt, err error)

Rollback calls the "rollback" endpoint of the "agentupgrades" service. Rollback may return the following errors:

  • "unauthorized" (type Unauthorized)
  • "forbidden" (type Forbidden)
  • "invalid" (type Invalid)
  • "not_found" (type NotFound)
  • "conflict" (type Conflict)
  • "unavailable" (type Unavailable)
  • error: internal error

func (*Client) Start

Start calls the "start" endpoint of the "agentupgrades" service. Start may return the following errors:

  • "unauthorized" (type Unauthorized)
  • "forbidden" (type Forbidden)
  • "invalid" (type Invalid)
  • "not_found" (type NotFound)
  • "conflict" (type Conflict)
  • "unavailable" (type Unavailable)
  • error: internal error

func (*Client) Status

func (c *Client) Status(ctx context.Context, p *StatusPayload) (res *AgentUpgradeAttempt, err error)

Status calls the "status" endpoint of the "agentupgrades" service. Status may return the following errors:

  • "unauthorized" (type Unauthorized)
  • "forbidden" (type Forbidden)
  • "invalid" (type Invalid)
  • "not_found" (type NotFound)
  • "conflict" (type Conflict)
  • "unavailable" (type Unavailable)
  • error: internal error

type Conflict

type Conflict string

A conflicting attempt, reservation or state prevents the request

func (Conflict) Error

func (e Conflict) Error() string

Error returns an error description.

func (Conflict) ErrorName deprecated

func (e Conflict) ErrorName() string

ErrorName returns the error name.

Deprecated: Use GoaErrorName - https://github.com/goadesign/goa/issues/3105

func (Conflict) GoaErrorName

func (e Conflict) GoaErrorName() string

GoaErrorName returns the error name.

type Endpoints

type Endpoints struct {
	Availability goa.Endpoint
	Start        goa.Endpoint
	Status       goa.Endpoint
	Cancel       goa.Endpoint
	Rollback     goa.Endpoint
}

Endpoints wraps the "agentupgrades" service endpoints.

func NewEndpoints

func NewEndpoints(s Service) *Endpoints

NewEndpoints wraps the methods of the "agentupgrades" service with endpoints.

func (*Endpoints) Use

func (e *Endpoints) Use(m func(goa.Endpoint) goa.Endpoint)

Use applies the given middleware to all the "agentupgrades" service endpoints.

type Forbidden

type Forbidden string

Administrator access and platform policy are required

func (Forbidden) Error

func (e Forbidden) Error() string

Error returns an error description.

func (Forbidden) ErrorName deprecated

func (e Forbidden) ErrorName() string

ErrorName returns the error name.

Deprecated: Use GoaErrorName - https://github.com/goadesign/goa/issues/3105

func (Forbidden) GoaErrorName

func (e Forbidden) GoaErrorName() string

GoaErrorName returns the error name.

type Invalid

type Invalid string

Invalid upgrade request

func (Invalid) Error

func (e Invalid) Error() string

Error returns an error description.

func (Invalid) ErrorName deprecated

func (e Invalid) ErrorName() string

ErrorName returns the error name.

Deprecated: Use GoaErrorName - https://github.com/goadesign/goa/issues/3105

func (Invalid) GoaErrorName

func (e Invalid) GoaErrorName() string

GoaErrorName returns the error name.

type NotFound

type NotFound string

Attempt not found

func (NotFound) Error

func (e NotFound) Error() string

Error returns an error description.

func (NotFound) ErrorName deprecated

func (e NotFound) ErrorName() string

ErrorName returns the error name.

Deprecated: Use GoaErrorName - https://github.com/goadesign/goa/issues/3105

func (NotFound) GoaErrorName

func (e NotFound) GoaErrorName() string

GoaErrorName returns the error name.

type RollbackPayload

type RollbackPayload struct {
	Namespace string
	Name      string
	AttemptID string
}

RollbackPayload is the payload type of the agentupgrades service rollback method.

type Service

type Service interface {
	// Fresh availability for one workspace; administrative access required
	Availability(context.Context, *AvailabilityPayload) (res *AgentUpgradeAvailability, err error)
	// Admit a single explicit upgrade; returns 202 with the durable attempt
	// identity
	Start(context.Context, *AgentUpgradeStartPayload) (res *AgentUpgradeAttempt, err error)
	// Protected attempt metadata/progress/outcome and independently authorized
	// recording links
	Status(context.Context, *StatusPayload) (res *AgentUpgradeAttempt, err error)
	// Request safe cancellation; never promises to kill an active MSI transaction
	Cancel(context.Context, *CancelPayload) (res *AgentUpgradeAttempt, err error)
	// Admit a separate, explicit rollback to that attempt's pinned previous payload
	Rollback(context.Context, *RollbackPayload) (res *AgentUpgradeAttempt, err error)
}

Administrator-only agent upgrade admission: availability, start, status, cancel and rollback

type StatusPayload

type StatusPayload struct {
	Namespace string
	Name      string
	AttemptID string
}

StatusPayload is the payload type of the agentupgrades service status method.

type Unauthorized

type Unauthorized string

A current UID-bound credential is required

func (Unauthorized) Error

func (e Unauthorized) Error() string

Error returns an error description.

func (Unauthorized) ErrorName deprecated

func (e Unauthorized) ErrorName() string

ErrorName returns the error name.

Deprecated: Use GoaErrorName - https://github.com/goadesign/goa/issues/3105

func (Unauthorized) GoaErrorName

func (e Unauthorized) GoaErrorName() string

GoaErrorName returns the error name.

type Unavailable

type Unavailable string

Upgrade storage or platform policy is unavailable

func (Unavailable) Error

func (e Unavailable) Error() string

Error returns an error description.

func (Unavailable) ErrorName deprecated

func (e Unavailable) ErrorName() string

ErrorName returns the error name.

Deprecated: Use GoaErrorName - https://github.com/goadesign/goa/issues/3105

func (Unavailable) GoaErrorName

func (e Unavailable) GoaErrorName() string

GoaErrorName returns the error name.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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