Documentation
¶
Overview ¶
Package placement owns explicit operator-managed execution placement retirement. It does not authorize Core dispatch, release harnesses or replay native work.
Index ¶
- Constants
- type Controller
- func (c *Controller) Enroll(ctx context.Context, id, owner, workspace string) (*Receipt, error)
- func (c *Controller) EnrollEnvironment(ctx context.Context, id, owner, workspace, environment string) (*Receipt, error)
- func (c *Controller) Retire(ctx context.Context, id string) (*Receipt, error)
- func (c *Controller) RetireEnvironment(ctx context.Context, id, environment string) (*Receipt, error)
- type Process
- type Receipt
- type Target
Constants ¶
const BindingLabel = "io.oac.placement"
BindingLabel marks a container explicitly created for operator enrollment.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller is the bounded local Linux/Docker retirement consumer. Its authority is the operator's private enrollment, never a public executor credential.
func New ¶
func New() (*Controller, error)
New uses a fixed local Docker endpoint and private state beneath ~/.oac.
func (*Controller) Enroll ¶
Enroll records an unscoped operator placement without Environment authority.
func (*Controller) EnrollEnvironment ¶
func (c *Controller) EnrollEnvironment(ctx context.Context, id, owner, workspace, environment string) (*Receipt, error)
EnrollEnvironment records an immutable operator-confirmed Environment association.
func (*Controller) RetireEnvironment ¶
func (c *Controller) RetireEnvironment(ctx context.Context, id, environment string) (*Receipt, error)
RetireEnvironment requires the same Environment before any supervisor access.
type Receipt ¶
type Receipt struct {
EnvironmentID string `json:"environment_id,omitempty"`
Version int `json:"version"`
State string `json:"state"`
Owner string `json:"owner"`
Target Target `json:"target"`
Members []Process `json:"members"`
RequestedAt time.Time `json:"requested_at"`
RetiredAt *time.Time `json:"retired_at,omitempty"`
}
Receipt is durable local evidence for one exact placement incarnation. Only State == "retired" reports qualified settlement; other states are unknown.
type Target ¶
type Target struct {
HostBootID string `json:"host_boot_id"`
Supervisor string `json:"supervisor"`
Container string `json:"container"`
Created string `json:"created"`
Started string `json:"started"`
Restarts int `json:"restarts"`
Image string `json:"image"`
Workspace string `json:"workspace"`
Cgroup string `json:"cgroup"`
Init Process `json:"init"`
}
Target binds local supervisor, immutable container and observed incarnation.