Documentation
¶
Overview ¶
Package workloadremoval defines the provider-neutral, owner-approved removal contract for one exact workload from a previously applied Architecture v2 runtime request.
Index ¶
- Constants
- func AuthorizationBytes(applied runtimeexecutor.ExecutionRequest, workloadRef, dataDisposition string, ...) ([]byte, error)
- func AuthorizationBytesForPlacement(applied runtimeexecutor.ExecutionRequest, placement AppliedPlacement, ...) ([]byte, error)
- func SelectAppliedWorkload(applied runtimeexecutor.ExecutionRequest, workloadRef string) (runtimeexecutor.ExecutionRequest, error)
- func SelectAppliedWorkloadPlacement(applied runtimeexecutor.ExecutionRequest, placement AppliedPlacement) (runtimeexecutor.ExecutionRequest, error)
- type AppliedPlacement
- type AuthorizationPayload
- type Evidence
- type EvidenceAuthority
- type Outcome
- type OwnerAuthorization
- type Request
- type Result
Constants ¶
const ( // APIVersion is the current owner-signed removal request. v1 remains the // published absence-only wire; this v2 admits an explicit data disposition // and must not be parsed as compatible with v1 canonical bytes. APIVersion = "stackkit.workload-removal/v2" ResultAPIVersion = "stackkit.workload-removal-result/v2" EvidenceAPIVersion = "stackkit.workload-removal-evidence/v2" StatusRemoved = "removed" ObservedStateAbsent = "absent" // DataDispositionRetain keeps declared application data volumes after the // workload containers are absent. It is the native default. DataDispositionRetain = "retain" // DataDispositionDelete removes only named volumes owned by this exact // applied workload after its containers are absent. DataDispositionDelete = "delete" )
Variables ¶
This section is empty.
Functions ¶
func AuthorizationBytes ¶
func AuthorizationBytesForPlacement ¶
func AuthorizationBytesForPlacement(applied runtimeexecutor.ExecutionRequest, placement AppliedPlacement, dataDisposition string, requestedAt, validUntil time.Time) ([]byte, error)
AuthorizationBytesForPlacement binds Owner approval to the original shared Apply receipt while authorizing only one exact verified placement below it.
func SelectAppliedWorkload ¶
func SelectAppliedWorkload(applied runtimeexecutor.ExecutionRequest, workloadRef string) (runtimeexecutor.ExecutionRequest, error)
SelectAppliedWorkload reduces a sealed Product Apply request to the exact workload child and its referenced immutable artifacts.
func SelectAppliedWorkloadPlacement ¶
func SelectAppliedWorkloadPlacement(applied runtimeexecutor.ExecutionRequest, placement AppliedPlacement) (runtimeexecutor.ExecutionRequest, error)
SelectAppliedWorkloadPlacement closes a multi-node Apply target onto one exact placement from the verified Apply result. The placement carries the shared request digest and target identity so a caller cannot use the helper as an unbound host or channel selector.
Types ¶
type AppliedPlacement ¶
type AppliedPlacement struct {
AppliedRequestDigest string `json:"appliedRequestDigest"`
WorkloadRef string `json:"workloadRef"`
RequirementID string `json:"requirementId"`
InstanceRef string `json:"instanceRef"`
SiteRef string `json:"siteRef"`
NodeRef string `json:"nodeRef"`
ExecutionChannelRef string `json:"executionChannelRef"`
}
AppliedPlacement is one exact workload placement recovered from a verified Product Apply result. It may narrow the sealed shared request but can never introduce a workload, requirement, instance, Site, or node outside it.
type AuthorizationPayload ¶
type AuthorizationPayload struct {
APIVersion string `json:"apiVersion"`
AppliedRequestDigest string `json:"appliedRequestDigest"`
PlanHash string `json:"planHash"`
WorkloadRef string `json:"workloadRef"`
RequirementID string `json:"requirementId"`
InstanceRef string `json:"instanceRef"`
DataDisposition string `json:"dataDisposition"`
RequestedAt string `json:"requestedAt"`
ValidUntil string `json:"validUntil"`
}
AuthorizationPayload is the exact canonical value signed by the Owner.
type Evidence ¶
type Evidence struct {
APIVersion string `json:"apiVersion"`
Authority EvidenceAuthority `json:"authority"`
Result Result `json:"result"`
EvidenceDigest string `json:"evidenceDigest"`
}
Evidence is the transport-safe projection produced by the pinned StackKits process. Request remains the local Owner authority; this value preserves its exact successful outcome without reconstructing or exporting that authority.
func NewEvidence ¶
NewEvidence projects a fully validated local Request and Result into the bounded terminal proof that may cross the execution channel.
func ParseEvidence ¶
ParseEvidence accepts only canonical, complete terminal evidence.
func (Evidence) AuthorizationBytes ¶
AuthorizationBytes returns the original Owner-signed authorization payload. A consumer with a separately pinned Owner public key can authenticate it without receiving or reconstructing the complete local Request.
type EvidenceAuthority ¶
type EvidenceAuthority struct {
AppliedRequestDigest string `json:"appliedRequestDigest"`
PlanHash string `json:"planHash"`
WorkloadRef string `json:"workloadRef"`
RequirementID string `json:"requirementId"`
InstanceRef string `json:"instanceRef"`
RuntimeOwnerRef string `json:"runtimeOwnerRef"`
ArtifactDigest string `json:"artifactDigest"`
DataDisposition string `json:"dataDisposition"`
SiteRef string `json:"siteRef"`
NodeRef string `json:"nodeRef"`
ExecutionChannelRef string `json:"executionChannelRef"`
RequestedAt string `json:"requestedAt"`
ValidUntil string `json:"validUntil"`
Authorization OwnerAuthorization `json:"authorization"`
RequestDigest string `json:"requestDigest"`
}
EvidenceAuthority is the minimal non-secret projection required to verify terminal absence without exporting the applied request's artifact content. It is derived only after the complete Request and Result have passed the StackKits-owned validators.
type Outcome ¶
type Outcome struct {
RequirementID string `json:"requirementId"`
WorkloadRef string `json:"workloadRef"`
InstanceRef string `json:"instanceRef"`
RuntimeOwnerRef string `json:"runtimeOwnerRef"`
ArtifactDigest string `json:"artifactDigest"`
DataDisposition string `json:"dataDisposition"`
Status string `json:"status"`
ObservedState string `json:"observedState"`
ObservationRef string `json:"observationRef"`
ObservationDigest string `json:"observationDigest"`
}
type OwnerAuthorization ¶
type OwnerAuthorization struct {
OwnerRef string `json:"ownerRef"`
KeyID string `json:"keyId"`
Value string `json:"value"`
}
OwnerAuthorization binds the destructive request to established local Owner custody. Signature is produced with localevidence's lifecycle mutation domain; the execution channel transports but never mints it.
type Request ¶
type Request struct {
APIVersion string `json:"apiVersion"`
AppliedRequestDigest string `json:"appliedRequestDigest"`
Applied runtimeexecutor.ExecutionRequest `json:"applied"`
WorkloadRef string `json:"workloadRef"`
DataDisposition string `json:"dataDisposition"`
RequestedAt string `json:"requestedAt"`
ValidUntil string `json:"validUntil"`
Authorization OwnerAuthorization `json:"authorization"`
RequestDigest string `json:"requestDigest"`
}
Request carries one closed child request recovered from successful Product Apply. It cannot select a provider, host, artifact, or execution channel that was absent from that applied authority.
func SealRequest ¶
func SealRequestForPlacement ¶
func SealRequestForPlacement(applied runtimeexecutor.ExecutionRequest, placement AppliedPlacement, dataDisposition string, requestedAt, validUntil time.Time, authorization OwnerAuthorization) (Request, error)
SealRequestForPlacement preserves the original shared Apply digest as lineage while sealing the exact narrowed child request used for removal.
func (Request) AuthorizationBytes ¶
AuthorizationBytes returns the Owner-signed payload for this request so a local executor can authenticate the data disposition before side effects.