Documentation
¶
Index ¶
- Constants
- Variables
- func NewAvailabilityEndpoint(s Service) goa.Endpoint
- func NewCancelEndpoint(s Service) goa.Endpoint
- func NewRollbackEndpoint(s Service) goa.Endpoint
- func NewStartEndpoint(s Service) goa.Endpoint
- func NewStatusEndpoint(s Service) goa.Endpoint
- func NewViewedAgentUpgradeAttempt(res *AgentUpgradeAttempt, view string) *agentupgradesviews.AgentUpgradeAttempt
- func NewViewedAgentUpgradeAvailability(res *AgentUpgradeAvailability, view string) *agentupgradesviews.AgentUpgradeAvailability
- type AgentUpgradeAttempt
- type AgentUpgradeAvailability
- type AgentUpgradeStartPayload
- type AvailabilityPayload
- type CancelPayload
- type Client
- func (c *Client) Availability(ctx context.Context, p *AvailabilityPayload) (res *AgentUpgradeAvailability, err error)
- func (c *Client) Cancel(ctx context.Context, p *CancelPayload) (res *AgentUpgradeAttempt, err error)
- func (c *Client) Rollback(ctx context.Context, p *RollbackPayload) (res *AgentUpgradeAttempt, err error)
- func (c *Client) Start(ctx context.Context, p *AgentUpgradeStartPayload) (res *AgentUpgradeAttempt, err error)
- func (c *Client) Status(ctx context.Context, p *StatusPayload) (res *AgentUpgradeAttempt, err error)
- type Conflict
- type Endpoints
- type Forbidden
- type Invalid
- type NotFound
- type RollbackPayload
- type Service
- type StatusPayload
- type Unauthorized
- type Unavailable
Constants ¶
const APIName = "kube-workspaces"
APIName is the name of the API as defined in the design.
const APIVersion = "1.0.0"
APIVersion is the version of the API as defined in the design.
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 ¶
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 ¶
NewAvailabilityEndpoint returns an endpoint function that calls the method "availability" of service "agentupgrades".
func NewCancelEndpoint ¶
NewCancelEndpoint returns an endpoint function that calls the method "cancel" of service "agentupgrades".
func NewRollbackEndpoint ¶
NewRollbackEndpoint returns an endpoint function that calls the method "rollback" of service "agentupgrades".
func NewStartEndpoint ¶
NewStartEndpoint returns an endpoint function that calls the method "start" of service "agentupgrades".
func NewStatusEndpoint ¶
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 ¶
AvailabilityPayload is the payload type of the agentupgrades service availability method.
type CancelPayload ¶
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 (*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 ¶
func (c *Client) Start(ctx context.Context, p *AgentUpgradeStartPayload) (res *AgentUpgradeAttempt, err error)
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) ErrorName
deprecated
ErrorName returns the error name.
Deprecated: Use GoaErrorName - https://github.com/goadesign/goa/issues/3105
func (Conflict) GoaErrorName ¶
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 ¶
NewEndpoints wraps the methods of the "agentupgrades" service with endpoints.
type Forbidden ¶
type Forbidden string
Administrator access and platform policy are required
func (Forbidden) ErrorName
deprecated
ErrorName returns the error name.
Deprecated: Use GoaErrorName - https://github.com/goadesign/goa/issues/3105
func (Forbidden) GoaErrorName ¶
GoaErrorName returns the error name.
type Invalid ¶
type Invalid string
Invalid upgrade request
func (Invalid) ErrorName
deprecated
ErrorName returns the error name.
Deprecated: Use GoaErrorName - https://github.com/goadesign/goa/issues/3105
func (Invalid) GoaErrorName ¶
GoaErrorName returns the error name.
type NotFound ¶
type NotFound string
Attempt not found
func (NotFound) ErrorName
deprecated
ErrorName returns the error name.
Deprecated: Use GoaErrorName - https://github.com/goadesign/goa/issues/3105
func (NotFound) GoaErrorName ¶
GoaErrorName returns the error name.
type RollbackPayload ¶
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 ¶
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) 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.