ateomsuspend

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package ateomsuspend asks the control plane, through the node-local atelet, to suspend an actor an ateom hosts.

This is the upward half of a suspend: the request travels ateom -> atelet -> ateapi, and the suspend the control plane decides to run travels back down the ordinary path as a Checkpoint into the ateom that asked. A caller must therefore hold no lock that Checkpoint needs while a request is in flight.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Actor

type Actor struct {
	Atespace string
	Name     string
	UID      string
}

Actor names the actor to suspend. The UID pins the request to the incarnation the ateom is hosting, so a request cannot outlive its actor and suspend a recreation that took the same name.

type Config

type Config struct {
	SocketPath           string
	CredentialBundlePath string
	TrustBundlePath      string
	// AteletSPIFFEID is the identity the node-local atelet must present. It
	// names atelet's namespace, not this worker's, so it is configured rather
	// than derived from the downward API.
	AteletSPIFFEID string
}

Config is what an ateom needs to reach the atelet on its node.

type Requester

type Requester struct {
	// contains filtered or unexported fields
}

Requester asks for suspends of the actors one ateom hosts.

func NewRequester

func NewRequester(cfg Config) (*Requester, error)

NewRequester loads the ateom's credentials once, at startup, so a misconfiguration surfaces there rather than at the first request.

func (*Requester) RequestSuspend

func (r *Requester) RequestSuspend(ctx context.Context, actor Actor) error

RequestSuspend asks that the named actor be suspended, and reports what the control plane answered.

It retries a request that could not be delivered, within the budget above. The caller may have only one chance to ask -- an actor that pushes an idleness signal does not necessarily push it again -- so a transient failure to reach the control plane must not be the reason a slot goes unreclaimed. The caller's own context bounds the whole thing.

A refusal is not retried. The control plane declining -- the actor is no longer assigned to this worker, or a resume, pause, or delete won the race -- is an answer, and asking again cannot change it.

Jump to

Keyboard shortcuts

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