Documentation
¶
Index ¶
- func ActorEgressPolicy(atespace string, destinations []string, credentials []egress.Credential) (*ateapipb.EgressPolicy, error)
- func ActorHost(atespace, actorID, suffix string) string
- func ActorName(sessionID string) string
- func ActorTargetFromHost(authority string) (string, error)
- func ActorTemplateForRevision(spec *translator.Revision, revisionID translator.RevisionID) (*ateapipb.ActorTemplate, error)
- func ActorTemplateSpecEqual(left, right *ateapipb.ActorTemplate) bool
- func AdvancePageToken(previous, next string) (string, error)
- func ApplyActorTransition(ctx context.Context, actors LifecycleClient, transition *ActorTransition) error
- func SandboxActorTemplate(template *v1alpha3.SandboxTemplate, class atev1alpha1.SandboxClass, ...) (*ateapipb.ActorTemplate, string, json.RawMessage, error)
- type ActorBinding
- type ActorCreation
- type ActorSnapshot
- type ActorTransition
- type Client
- func (c *Client) Close() error
- func (c *Client) CreateActor(ctx context.Context, atespace, actorID, tmplNS, tmplName string) (*ateapipb.Actor, error)
- func (c *Client) CreateActorFromTag(ctx context.Context, ...) (*ateapipb.Actor, error)
- func (c *Client) CreateActorTemplate(ctx context.Context, template *ateapipb.ActorTemplate) (*ateapipb.ActorTemplate, error)
- func (c *Client) CreateTag(ctx context.Context, atespace, name, actorName string) (*ateapipb.Tag, error)
- func (c *Client) DeleteActor(ctx context.Context, atespace, actorID string) error
- func (c *Client) DeleteActorTemplate(ctx context.Context, atespace, name string) error
- func (c *Client) DeleteTag(ctx context.Context, atespace, name, uid string) error
- func (c *Client) EnsureActorEgressPolicy(ctx context.Context, atespace, name string, policy *ateapipb.EgressPolicy) error
- func (c *Client) EnsureAtespace(ctx context.Context, name string) error
- func (c *Client) GetActor(ctx context.Context, atespace, actorID string) (*ateapipb.Actor, error)
- func (c *Client) GetActorTemplate(ctx context.Context, atespace, name string) (*ateapipb.ActorTemplate, error)
- func (c *Client) GetTag(ctx context.Context, atespace, name string) (*ateapipb.Tag, error)
- func (c *Client) ListActorTemplates(ctx context.Context, atespace string) ([]*ateapipb.ActorTemplate, error)
- func (c *Client) ListActorTemplatesPage(ctx context.Context, atespace string, pageToken string) ([]*ateapipb.ActorTemplate, string, error)
- func (c *Client) ListActorsPage(ctx context.Context, atespace string, pageSize int32, pageToken string) ([]*ateapipb.Actor, string, error)
- func (c *Client) ListWorkersPage(ctx context.Context, pageSize int32, pageToken string) ([]*ateapipb.Worker, string, error)
- func (c *Client) ResumeActor(ctx context.Context, atespace, actorID string) (*ateapipb.Actor, error)
- func (c *Client) SuspendActor(ctx context.Context, atespace, actorID string) (*ateapipb.Actor, error)
- type Config
- type LifecycleClient
- type SandboxPolicy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ActorEgressPolicy ¶
func ActorEgressPolicy(atespace string, destinations []string, credentials []egress.Credential) (*ateapipb.EgressPolicy, error)
ActorEgressPolicy compiles HTTP(S) origins into an actor's default allowlist. Credential bindings are already canonicalized by the store.
func ActorTargetFromHost ¶
ActorTargetFromHost converts a stored A2A authority to Substrate's ate-target-actor header value. The authority itself is no longer routable.
func ActorTemplateForRevision ¶
func ActorTemplateForRevision(spec *translator.Revision, revisionID translator.RevisionID) (*ateapipb.ActorTemplate, error)
ActorTemplateForRevision constructs the immutable ate-api resource for a compiled revision. It performs no reads or writes, which makes it safe to use inside a KRT transformation.
func ActorTemplateSpecEqual ¶
func ActorTemplateSpecEqual(left, right *ateapipb.ActorTemplate) bool
ActorTemplateSpecEqual compares the client-owned immutable fields of two templates, excluding server-owned metadata and golden-snapshot status.
func AdvancePageToken ¶
AdvancePageToken moves a paging loop on, refusing a token that repeats itself: a server answering with the token it was given is not advancing, and a loop that follows it re-reads the same page until whatever cap is above it. Exported because every loop over ate-api's pagination wants the check.
func ApplyActorTransition ¶
func ApplyActorTransition(ctx context.Context, actors LifecycleClient, transition *ActorTransition) error
ApplyActorTransition requires durable execution authority. Errors retain the claim's durable intent and pins. Another bounded attempt can retry that intent.
func SandboxActorTemplate ¶
func SandboxActorTemplate(template *v1alpha3.SandboxTemplate, class atev1alpha1.SandboxClass, policy SandboxPolicy) (*ateapipb.ActorTemplate, string, json.RawMessage, error)
SandboxActorTemplate compiles standalone inputs without an Agent Card or Harness. The image's entrypoint is replaced by the pinned, platform-managed guest.
Types ¶
type ActorBinding ¶
type ActorCreation ¶
type ActorCreation struct {
EgressPolicy *ateapipb.EgressPolicy
Snapshot *ActorSnapshot
Resume bool
}
ActorCreation describes runtime startup, independent of the owning API. Agent creation stays suspended; a standalone guest starts serving immediately.
type ActorSnapshot ¶
type ActorSnapshot struct {
Tag *ateapipb.ObjectRef
URI string
ContentScope ateapipb.SnapshotContentScope
}
type ActorTransition ¶
type ActorTransition struct {
// contains filtered or unexported fields
}
func PrepareActorRetry ¶
func PrepareActorRetry(ctx context.Context, actors LifecycleClient, binding ActorBinding, operation apiv1.RuntimeOperation, creation *ActorCreation) (*ActorTransition, error)
PrepareActorRetry resumes previously issued intent. Substrate serializes lifecycle mutations with its Actor lease and resumes incomplete workflows. The immutable runtime name and pinned template identify an existing creation.
func PrepareActorTransition ¶
func PrepareActorTransition(ctx context.Context, actors LifecycleClient, binding ActorBinding, operation apiv1.RuntimeOperation, creation *ActorCreation) (*ActorTransition, error)
PrepareActorTransition performs read-only checks before the store's durable claim. It never adopts an existing Actor for an unissued creation.
func (*ActorTransition) ActorUID ¶
func (t *ActorTransition) ActorUID() string
ActorUID returns the observed runtime identity, including after creation.
type Client ¶
type Client struct {
ateapipb.ControlClient
// contains filtered or unexported fields
}
Client wraps ate-api Control gRPC.
func (*Client) CreateActor ¶
func (*Client) CreateActorFromTag ¶
func (*Client) CreateActorTemplate ¶
func (c *Client) CreateActorTemplate(ctx context.Context, template *ateapipb.ActorTemplate) (*ateapipb.ActorTemplate, error)
func (*Client) DeleteActor ¶
func (*Client) DeleteActorTemplate ¶
DeleteActorTemplate delegates golden Actor and Tag cleanup to Substrate.
func (*Client) EnsureActorEgressPolicy ¶
func (c *Client) EnsureActorEgressPolicy(ctx context.Context, atespace, name string, policy *ateapipb.EgressPolicy) error
EnsureActorEgressPolicy can be retried after a lost create response. A prepared revision is immutable, so an existing policy must match; never accept or overwrite a different allowlist. Substrate deletes the policy with its Actor.
func (*Client) EnsureAtespace ¶
EnsureAtespace idempotently ensures the named atespace exists on the substrate side. Actors cannot be created into a nonexistent atespace (FailedPrecondition).
func (*Client) GetActorTemplate ¶
func (*Client) ListActorTemplates ¶
func (c *Client) ListActorTemplates(ctx context.Context, atespace string) ([]*ateapipb.ActorTemplate, error)
ListActorTemplates returns every template in an atespace, following pagination. Draining is right here where it is not for actors: templates are configuration, so operators set their count rather than the cluster.
func (*Client) ListActorTemplatesPage ¶
func (c *Client) ListActorTemplatesPage(ctx context.Context, atespace string, pageToken string) ([]*ateapipb.ActorTemplate, string, error)
ListActorTemplatesPage returns one page of templates in the given atespace, with the token for the next page or "" on the last one.
func (*Client) ListActorsPage ¶
func (c *Client) ListActorsPage(ctx context.Context, atespace string, pageSize int32, pageToken string) ([]*ateapipb.Actor, string, error)
ListActorsPage returns one page of actors in the given atespace (empty = all of them, including substrate's reserved golden atespace), with the token for the next page or "" on the last. A page may be empty and still not be the last, so a caller that stops on an empty page stops early.
func (*Client) ListWorkersPage ¶
func (c *Client) ListWorkersPage(ctx context.Context, pageSize int32, pageToken string) ([]*ateapipb.Worker, string, error)
ListWorkersPage returns one page of workers, with the token for the next page or "" on the last one.
func (*Client) ResumeActor ¶
type Config ¶
type Config struct {
// AteAPIEndpoint is a gRPC target (e.g. dns:///api.ate-system.svc:443).
AteAPIEndpoint string
// CAFile contains the CA certificates used to verify ate-api.
CAFile string
// ClientCertFile contains the PEM client certificate and private key used for mTLS.
ClientCertFile string
DialTimeout time.Duration
CallTimeout time.Duration
}
Config holds connection settings for Agent Substrate ate-api.
type LifecycleClient ¶
type LifecycleClient interface {
GetActor(context.Context, string, string) (*ateapipb.Actor, error)
CreateActor(context.Context, string, string, string, string) (*ateapipb.Actor, error)
CreateActorFromTag(context.Context, string, string, string, string, string, string) (*ateapipb.Actor, error)
EnsureActorEgressPolicy(context.Context, string, string, *ateapipb.EgressPolicy) error
ResumeActor(context.Context, string, string) (*ateapipb.Actor, error)
SuspendActor(context.Context, string, string) (*ateapipb.Actor, error)
DeleteActor(context.Context, string, string) error
}
type SandboxPolicy ¶
SandboxPolicy is operator-owned. Its resolved values are pinned in each revision.