placement

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2026 License: MIT Imports: 13 Imported by: 0 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 placement owns explicit operator-managed execution placement retirement. It does not authorize Core dispatch, release harnesses or replay native work.

Index

Constants

View Source
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

func (c *Controller) Enroll(ctx context.Context, id, owner, workspace string) (*Receipt, error)

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) Retire

func (c *Controller) Retire(ctx context.Context, id string) (*Receipt, error)

Retire reconciles only unscoped operator enrollment.

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 Process

type Process struct {
	PID   int    `json:"pid"`
	Start string `json:"start"`
}

Process includes Linux start ticks to distinguish a reused PID.

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.

Jump to

Keyboard shortcuts

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