Documentation
¶
Index ¶
- Constants
- func ReportIdle(done bool) error
- type Workspace
- func (e *Workspace) Delete(ctx context.Context, session agentdomain.Session) error
- func (e *Workspace) Ensure(ctx context.Context, session agentdomain.Session) (agentdomain.Endpoint, error)
- func (e *Workspace) Kind() agentdomain.WorkspaceKind
- func (e *Workspace) Name() string
- func (e *Workspace) Probe(ctx context.Context) agentdomain.WorkspaceStatus
- func (e *Workspace) Reach(ctx context.Context, session agentdomain.Session) (agentdomain.Endpoint, error)
- func (e *Workspace) Suspend(ctx context.Context, session agentdomain.Session) error
Constants ¶
const TerminationLog = "/dev/termination-log"
TerminationLog is the file Kubernetes reads a container's termination message from.
Variables ¶
This section is empty.
Functions ¶
func ReportIdle ¶
ReportIdle leaves the operator the termination message of a pod daemon that idles out: whether every agent it ran is done, which starts the Orchestrator's retention. Outside a pod there is nothing to report.
Types ¶
type Workspace ¶
type Workspace struct {
// contains filtered or unexported fields
}
Workspace runs sessions as Inference Gateway operator Orchestrators: one per session, running the infer daemon in an agent-sandbox Sandbox, reached through a port-forward unless the entry names an address.
func New ¶
func New(entry config.WorkspaceEntry, identity string, tls *agentinfra.TLSProvider, pki *agentinfra.PKI) (*Workspace, error)
New connects to the cluster the entry names and returns the workspace.
func (*Workspace) Delete ¶
Delete removes the session's Orchestrator and its Secret. The operator's Sandbox and its volumes go with the Orchestrator.
func (*Workspace) Ensure ¶
func (e *Workspace) Ensure(ctx context.Context, session agentdomain.Session) (agentdomain.Endpoint, error)
Ensure creates or resumes the session's Orchestrator, waits for its daemon to be ready, and returns the daemon's binding through a port-forward.
func (*Workspace) Kind ¶
func (e *Workspace) Kind() agentdomain.WorkspaceKind
func (*Workspace) Probe ¶
func (e *Workspace) Probe(ctx context.Context) agentdomain.WorkspaceStatus
Probe lists this workspace's Orchestrators and the cluster version. A missing operator or an unreachable cluster is the error.
func (*Workspace) Reach ¶
func (e *Workspace) Reach(ctx context.Context, session agentdomain.Session) (agentdomain.Endpoint, error)
Reach resumes the session's Orchestrator like Ensure but never creates one, so an Orchestrator its retention deleted is reported instead of replaced by an empty one.