diff --git a/cmd/ateapi/internal/store/ateredis/ateredis.go b/cmd/ateapi/internal/store/ateredis/ateredis.go index 6ab62b769..8123a2832 100644 --- a/cmd/ateapi/internal/store/ateredis/ateredis.go +++ b/cmd/ateapi/internal/store/ateredis/ateredis.go @@ -62,6 +62,9 @@ import ( "google.golang.org/protobuf/types/known/timestamppb" ) +// globalAtespace in Substrate is represented by "". +const globalAtespace = "" + type workerPubSubMsg struct { Type int `json:"t"` Worker string `json:"w"` // protojson-encoded Worker @@ -101,7 +104,7 @@ func actorDBKey(actorRef resources.ActorRef) string { // atespace lists across all atespaces (actor:*); a non-empty atespace scopes the // scan to that atespace (actor::*). func actorScanPattern(atespace string) string { - if atespace == "" { + if atespace == globalAtespace { return "actor:*" } return "actor:" + atespace + ":*" @@ -112,7 +115,7 @@ func actorSnapshotDBKey(atespace, name string) string { } func actorSnapshotScanPattern(atespace string) string { - if atespace == "" { + if atespace == globalAtespace { return "actor-snapshot:*" } return "actor-snapshot:" + atespace + ":*" @@ -135,7 +138,7 @@ func (s *Persistence) CreateAtespace(ctx context.Context, atespace *ateapipb.Ate dbAtespace := proto.Clone(atespace).(*ateapipb.Atespace) // Atespace is global-scoped: identity is the name alone (atespace stays empty). - dbAtespace.Metadata = newCreateMetadata("", atespace.GetMetadata().GetName()) + dbAtespace.Metadata = newCreateMetadata(globalAtespace, atespace.GetMetadata().GetName()) dbBytes, err := protojson.Marshal(dbAtespace) if err != nil { @@ -197,8 +200,8 @@ func (s *Persistence) ListAtespaces(ctx context.Context, pageSize int32, pageTok } // DeleteAtespace deletes an empty atespace. Returns store.ErrNotFound if the -// atespace does not exist, or store.ErrFailedPrecondition if any Actor or -// ActorSnapshotTag still lives in it. +// atespace does not exist, or store.ErrFailedPrecondition if any Actor, +// ActorSnapshotTag, ActorTemplate or ActorTemplateVersion still lives in it. func (s *Persistence) DeleteAtespace(ctx context.Context, name string) (*ateapipb.Atespace, error) { dbKey := atespaceDBKey(name) @@ -232,6 +235,20 @@ func (s *Persistence) DeleteAtespace(ctx context.Context, name string) (*ateapip if hasTags { return nil, store.ErrFailedPrecondition } + hasTemplates, err := s.hasMatching(ctx, actorTemplateScanPattern(name)) + if err != nil { + return nil, fmt.Errorf("while checking ActorTemplates: %w", err) + } + if hasTemplates { + return nil, store.ErrFailedPrecondition + } + hasVersions, err := s.hasMatching(ctx, actorTemplateVersionScanPattern(name)) + if err != nil { + return nil, fmt.Errorf("while checking ActorTemplateVersions: %w", err) + } + if hasVersions { + return nil, store.ErrFailedPrecondition + } if err := s.rdb.Del(ctx, dbKey).Err(); err != nil { return nil, fmt.Errorf("while deleting atespace key %q: %w", dbKey, err) } @@ -260,6 +277,327 @@ func (s *Persistence) hasMatching(ctx context.Context, pattern string) (bool, er return false, nil } +func actorTemplateDBKey(templateRef resources.ActorTemplateRef) string { + return "actor-template:" + templateRef.Atespace + ":" + templateRef.Name +} + +func actorTemplateScanPattern(atespace string) string { + if atespace == globalAtespace { + return "actor-template:*" + } + return "actor-template:" + atespace + ":*" +} + +func actorTemplateVersionDBKey(versionRef resources.ActorTemplateVersionRef) string { + return "actor-template-version:" + versionRef.Atespace + ":" + versionRef.Name +} + +func actorTemplateVersionScanPattern(atespace string) string { + if atespace == globalAtespace { + return "actor-template-version:*" + } + return "actor-template-version:" + atespace + ":*" +} + +func (s *Persistence) CreateActorTemplate(ctx context.Context, template *ateapipb.ActorTemplate) (*ateapipb.ActorTemplate, error) { + dbKey := actorTemplateDBKey(resources.ActorTemplateRefFromActorTemplate(template)) + + dbTemplate := proto.Clone(template).(*ateapipb.ActorTemplate) + dbTemplate.Metadata = newCreateMetadata(template.GetMetadata().GetAtespace(), template.GetMetadata().GetName()) + + dbBytes, err := protojson.Marshal(dbTemplate) + if err != nil { + return nil, fmt.Errorf("in protojson.Marshal: %w", err) + } + ok, err := s.rdb.SetNX(ctx, dbKey, dbBytes, 0).Result() + if err != nil { + return nil, fmt.Errorf("while executing redis set: %w", err) + } + if !ok { + return nil, store.ErrAlreadyExists + } + return dbTemplate, nil +} + +func (s *Persistence) GetActorTemplate(ctx context.Context, templateRef resources.ActorTemplateRef) (*ateapipb.ActorTemplate, error) { + dbKey := actorTemplateDBKey(templateRef) + dbBytes, err := s.rdb.Get(ctx, dbKey).Bytes() + if err != nil { + if errors.Is(err, redis.Nil) { + return nil, store.ErrNotFound + } + return nil, fmt.Errorf("while getting actor template key %q: %w", dbKey, err) + } + template := &ateapipb.ActorTemplate{} + if err := protojson.Unmarshal(dbBytes, template); err != nil { + return nil, fmt.Errorf("while unmarshaling actor template: %w", err) + } + if resources.ActorTemplateRefFromActorTemplate(template) != templateRef { + return nil, fmt.Errorf("(impossible) mismatch between stored identity and key %q", dbKey) + } + return template, nil +} + +// ActorTemplateExists reports whether the ActorTemplate exists. This is a +// plain EXISTS check and is NOT atomic with respect to a concurrent +// DeleteActorTemplate. +func (s *Persistence) ActorTemplateExists(ctx context.Context, templateRef resources.ActorTemplateRef) (bool, error) { + n, err := s.rdb.Exists(ctx, actorTemplateDBKey(templateRef)).Result() + if err != nil { + return false, fmt.Errorf("while checking actor template existence: %w", err) + } + return n > 0, nil +} + +// validateUpdateActorTemplateMutation reports whether a template mutation left +// the fields it does not own alone. +func validateUpdateActorTemplateMutation(storedTemplate, mutatedTemplate *ateapipb.ActorTemplate) error { + if stored, mutated := storedTemplate.GetMetadata().GetAtespace(), mutatedTemplate.GetMetadata().GetAtespace(); stored != mutated { + return fmt.Errorf("metadata.atespace is immutable: mutation changed it from %q to %q", stored, mutated) + } + if stored, mutated := storedTemplate.GetMetadata().GetName(), mutatedTemplate.GetMetadata().GetName(); stored != mutated { + return fmt.Errorf("metadata.name is immutable: mutation changed it from %q to %q", stored, mutated) + } + return nil +} + +func (s *Persistence) UpdateActorTemplate(ctx context.Context, templateRef resources.ActorTemplateRef, mutate func(*ateapipb.ActorTemplate) error) (*ateapipb.ActorTemplate, error) { + dbKey := actorTemplateDBKey(templateRef) + for range updateMaxAttempts { + var dbTemplate *ateapipb.ActorTemplate + var abortErr error + + err := s.rdb.Watch(ctx, func(tx *redis.Tx) error { + currentVal, err := tx.Get(ctx, dbKey).Bytes() + if err != nil { + if errors.Is(err, redis.Nil) { + return store.ErrNotFound + } + return fmt.Errorf("while getting actor template: %w", err) + } + + currentTemplate := &ateapipb.ActorTemplate{} + if err := protojson.Unmarshal(currentVal, currentTemplate); err != nil { + return fmt.Errorf("in protojson.Unmarshal: %w", err) + } + + // Snapshot the stored state before handing the template to mutate. + // mutate is free to edit anything it is given. + templateBeforeMutation := proto.Clone(currentTemplate).(*ateapipb.ActorTemplate) + if err := mutate(currentTemplate); err != nil { + abortErr = err + return err + } + if err := validateUpdateActorTemplateMutation(templateBeforeMutation, currentTemplate); err != nil { + abortErr = err + return err + } + // The stored metadata is authoritative; derive the next metadata + // from it, discarding whatever mutate made of it. + currentTemplate.Metadata = newUpdateMetadata(templateBeforeMutation.GetMetadata()) + + newVal, err := protojson.Marshal(currentTemplate) + if err != nil { + return fmt.Errorf("in protojson.Marshal: %w", err) + } + + if _, err := tx.TxPipelined(ctx, func(pipe redis.Pipeliner) error { + pipe.Set(ctx, dbKey, newVal, 0) + return nil + }); err != nil { + return err + } + dbTemplate = currentTemplate + return nil + }, dbKey) + + switch { + case err == nil: + return dbTemplate, nil + case abortErr != nil: + return nil, abortErr + case errors.Is(err, store.ErrNotFound): + return nil, store.ErrNotFound + case errors.Is(err, redis.TxFailedErr): + // A concurrent write landed between WATCH and EXEC, so mutate never + // saw it. Re-read and run it against the newer state. + continue + default: + return nil, fmt.Errorf("while executing update actor template transaction: %w", err) + } + } + + // Only the TxFailedErr branch continues the loop, so getting here means every + // attempt lost the race. + return nil, store.ErrVersionConflict +} + +func (s *Persistence) ListActorTemplates(ctx context.Context, atespace string, pageSize int32, pageTokenStr string) ([]*ateapipb.ActorTemplate, string, error) { + var result []*ateapipb.ActorTemplate + nextToken, err := s.listPage(ctx, actorTemplateScanPattern(atespace), pageSize, pageTokenStr, func(ctx context.Context, master *redis.Client, keys []string) (int, error) { + templates, err := fetchProtos(ctx, master, keys, func() *ateapipb.ActorTemplate { return &ateapipb.ActorTemplate{} }) + if err != nil { + return 0, err + } + result = append(result, templates...) + return len(templates), nil + }) + if err != nil { + return nil, "", err + } + return result, nextToken, nil +} + +// DeleteActorTemplate deletes an ActorTemplate with no remaining versions. +// Returns store.ErrNotFound if the template does not exist, or +// store.ErrFailedPrecondition while any ActorTemplateVersion still names it +// as parent. +func (s *Persistence) DeleteActorTemplate(ctx context.Context, templateRef resources.ActorTemplateRef) (*ateapipb.ActorTemplate, error) { + dbKey := actorTemplateDBKey(templateRef) + + // Read first, so a missing template returns NotFound (not a silent no-op) + // and so we can return the deleted resource. + currentVal, err := s.rdb.Get(ctx, dbKey).Bytes() + if err != nil { + if errors.Is(err, redis.Nil) { + return nil, store.ErrNotFound + } + return nil, fmt.Errorf("while getting actor template key %q: %w", dbKey, err) + } + + deleted := &ateapipb.ActorTemplate{} + if err := protojson.Unmarshal(currentVal, deleted); err != nil { + return nil, fmt.Errorf("in protojson.Unmarshal: %w", err) + } + + // Reject while any version still names this template as parent. The + // parent lives in the stored value, not the key, so probe via the + // filtered list (pageSize 1 stops at the first match). + versions, _, err := s.ListActorTemplateVersions(ctx, globalAtespace, templateRef, 1, "") + if err != nil { + return nil, fmt.Errorf("while checking for remaining versions: %w", err) + } + if len(versions) > 0 { + return nil, store.ErrFailedPrecondition + } + if err := s.rdb.Del(ctx, dbKey).Err(); err != nil { + return nil, fmt.Errorf("while deleting actor template key %q: %w", dbKey, err) + } + return deleted, nil +} + +func (s *Persistence) CreateActorTemplateVersion(ctx context.Context, atv *ateapipb.ActorTemplateVersion) (*ateapipb.ActorTemplateVersion, error) { + dbKey := actorTemplateVersionDBKey(resources.ActorTemplateVersionRefFromActorTemplateVersion(atv)) + + dbVersion := proto.Clone(atv).(*ateapipb.ActorTemplateVersion) + dbVersion.Metadata = newCreateMetadata(atv.GetMetadata().GetAtespace(), atv.GetMetadata().GetName()) + + dbBytes, err := protojson.Marshal(dbVersion) + if err != nil { + return nil, fmt.Errorf("in protojson.Marshal: %w", err) + } + ok, err := s.rdb.SetNX(ctx, dbKey, dbBytes, 0).Result() + if err != nil { + return nil, fmt.Errorf("while executing redis set: %w", err) + } + if !ok { + return nil, store.ErrAlreadyExists + } + return dbVersion, nil +} + +func (s *Persistence) GetActorTemplateVersion(ctx context.Context, versionRef resources.ActorTemplateVersionRef) (*ateapipb.ActorTemplateVersion, error) { + dbKey := actorTemplateVersionDBKey(versionRef) + dbBytes, err := s.rdb.Get(ctx, dbKey).Bytes() + if err != nil { + if errors.Is(err, redis.Nil) { + return nil, store.ErrNotFound + } + return nil, fmt.Errorf("while getting actor template version key %q: %w", dbKey, err) + } + version := &ateapipb.ActorTemplateVersion{} + if err := protojson.Unmarshal(dbBytes, version); err != nil { + return nil, fmt.Errorf("while unmarshaling actor template version: %w", err) + } + if resources.ActorTemplateVersionRefFromActorTemplateVersion(version) != versionRef { + return nil, fmt.Errorf("(impossible) mismatch between stored identity and key %q", dbKey) + } + return version, nil +} + +// ListActorTemplateVersions lists ActorTemplateVersions in an atespace (all +// atespaces when atespace is ""), filtered to one parent template when +// actorTemplateRef is non-zero. atespace scopes the versions scanned, not the +// parent: stored parent refs are fully qualified, so the filter matches the +// parent's atespace and name. +func (s *Persistence) ListActorTemplateVersions(ctx context.Context, atespace string, actorTemplateRef resources.ActorTemplateRef, pageSize int32, pageTokenStr string) ([]*ateapipb.ActorTemplateVersion, string, error) { + var result []*ateapipb.ActorTemplateVersion + nextToken, err := s.listPage(ctx, actorTemplateVersionScanPattern(atespace), pageSize, pageTokenStr, func(ctx context.Context, master *redis.Client, keys []string) (int, error) { + versions, err := fetchProtos(ctx, master, keys, func() *ateapipb.ActorTemplateVersion { return &ateapipb.ActorTemplateVersion{} }) + if err != nil { + return 0, err + } + matched := 0 + for _, v := range versions { + if actorTemplateRef != (resources.ActorTemplateRef{}) && resources.ActorTemplateRefFromObjectRef(v.GetActorTemplate()) != actorTemplateRef { + continue + } + result = append(result, v) + matched++ + } + return matched, nil + }) + if err != nil { + return nil, "", err + } + return result, nextToken, nil +} + +// DeleteActorTemplateVersion deletes an ActorTemplateVersion together with +// its recorded golden snapshot, if any. Returns store.ErrNotFound if +// the version does not exist, or store.ErrFailedPrecondition while it is its +// parent's default_version_on_create. +func (s *Persistence) DeleteActorTemplateVersion(ctx context.Context, versionRef resources.ActorTemplateVersionRef) (*ateapipb.ActorTemplateVersion, error) { + dbKey := actorTemplateVersionDBKey(versionRef) + + currentVal, err := s.rdb.Get(ctx, dbKey).Bytes() + if err != nil { + if errors.Is(err, redis.Nil) { + return nil, store.ErrNotFound + } + return nil, fmt.Errorf("while getting actor template version key %q: %w", dbKey, err) + } + + deleted := &ateapipb.ActorTemplateVersion{} + if err := protojson.Unmarshal(currentVal, deleted); err != nil { + return nil, fmt.Errorf("in protojson.Unmarshal: %w", err) + } + + // Reject while the parent still names this version as its default. + parent, err := s.GetActorTemplate(ctx, resources.ActorTemplateRef{Atespace: versionRef.Atespace, Name: deleted.GetActorTemplate().GetName()}) + if err != nil && !errors.Is(err, store.ErrNotFound) { + return nil, fmt.Errorf("while getting parent actor template: %w", err) + } + if resources.ActorTemplateVersionRefFromObjectRef(parent.GetDefaultVersionOnCreate()) == versionRef { + return nil, store.ErrFailedPrecondition + } + // TODO(actor-template-versions): also reject while any Actor or + // ActorSnapshot references this version, once those resources carry + // template-version fields. + + if golden := deleted.GetGoldenSnapshot(); golden != nil { + goldenKey := actorSnapshotDBKey(golden.GetAtespace(), golden.GetName()) + if err := s.rdb.Del(ctx, goldenKey).Err(); err != nil { + return nil, fmt.Errorf("while deleting golden snapshot key %q: %w", goldenKey, err) + } + } + + if err := s.rdb.Del(ctx, dbKey).Err(); err != nil { + return nil, fmt.Errorf("while deleting actor template version key %q: %w", dbKey, err) + } + return deleted, nil +} + func workerDBKey(namespace, poolName, podName string) string { return "worker:" + namespace + ":" + poolName + ":" + podName } @@ -772,13 +1110,13 @@ func validateUpdateActorMutation(storedActor, mutatedActor *ateapipb.Actor) erro return nil } -// updateActorMaxAttempts bounds how many times UpdateActor re-runs its +// updateMaxAttempts bounds how many times UpdateActor or UpdateActorTemplate re-runs its // read-modify-write after a concurrent writer invalidates the transaction. -const updateActorMaxAttempts = 5 +const updateMaxAttempts = 5 func (s *Persistence) UpdateActor(ctx context.Context, actorRef resources.ActorRef, mutate func(*ateapipb.Actor) error) (*ateapipb.Actor, error) { dbKey := actorDBKey(actorRef) - for range updateActorMaxAttempts { + for range updateMaxAttempts { var dbActor *ateapipb.Actor var abortErr error diff --git a/cmd/ateapi/internal/store/ateredis/ateredis_test.go b/cmd/ateapi/internal/store/ateredis/ateredis_test.go index 3d2b03dcf..f5bc394a8 100644 --- a/cmd/ateapi/internal/store/ateredis/ateredis_test.go +++ b/cmd/ateapi/internal/store/ateredis/ateredis_test.go @@ -1720,6 +1720,48 @@ func TestDeleteAtespace_WithTags_Rejected(t *testing.T) { } } +func TestDeleteAtespace_WithActorTemplates_Rejected(t *testing.T) { + _, s, ctx := setupTest(t) + + if _, err := s.CreateAtespace(ctx, newTestAtespace("team-a")); err != nil { + t.Fatalf("CreateAtespace: %v", err) + } + if _, err := s.CreateActorTemplate(ctx, newTestActorTemplate("team-a", "tmpl-a")); err != nil { + t.Fatalf("CreateActorTemplate: %v", err) + } + if _, err := s.DeleteAtespace(ctx, "team-a"); !errors.Is(err, store.ErrFailedPrecondition) { + t.Fatalf("DeleteAtespace with templates = %v, want ErrFailedPrecondition", err) + } + + if _, err := s.DeleteActorTemplate(ctx, resources.ActorTemplateRef{Atespace: "team-a", Name: "tmpl-a"}); err != nil { + t.Fatalf("DeleteActorTemplate: %v", err) + } + if _, err := s.DeleteAtespace(ctx, "team-a"); err != nil { + t.Errorf("DeleteAtespace after template removed = %v, want nil", err) + } +} + +func TestDeleteAtespace_WithActorTemplateVersions_Rejected(t *testing.T) { + _, s, ctx := setupTest(t) + + if _, err := s.CreateAtespace(ctx, newTestAtespace("team-a")); err != nil { + t.Fatalf("CreateAtespace: %v", err) + } + if _, err := s.CreateActorTemplateVersion(ctx, newTestActorTemplateVersion("team-a", "tmpl-a-v1", "tmpl-a")); err != nil { + t.Fatalf("CreateActorTemplateVersion: %v", err) + } + if _, err := s.DeleteAtespace(ctx, "team-a"); !errors.Is(err, store.ErrFailedPrecondition) { + t.Fatalf("DeleteAtespace with versions = %v, want ErrFailedPrecondition", err) + } + + if _, err := s.DeleteActorTemplateVersion(ctx, resources.ActorTemplateVersionRef{Atespace: "team-a", Name: "tmpl-a-v1"}); err != nil { + t.Fatalf("DeleteActorTemplateVersion: %v", err) + } + if _, err := s.DeleteAtespace(ctx, "team-a"); err != nil { + t.Errorf("DeleteAtespace after version removed = %v, want nil", err) + } +} + func TestDeleteAtespace_NotFound(t *testing.T) { _, s, ctx := setupTest(t) @@ -2169,3 +2211,758 @@ func failsNTimesThenHangs(n int, err error) evalFunc { return hangs(ctx, sha1, keys, args...) } } + +func newTestActorTemplate(atespace, name string) *ateapipb.ActorTemplate { + return &ateapipb.ActorTemplate{Metadata: &ateapipb.ResourceMetadata{Atespace: atespace, Name: name}} +} + +func newTestActorTemplateVersion(atespace, name, template string) *ateapipb.ActorTemplateVersion { + return &ateapipb.ActorTemplateVersion{ + Metadata: &ateapipb.ResourceMetadata{Atespace: atespace, Name: name}, + ActorTemplate: &ateapipb.ObjectRef{Atespace: atespace, Name: template}, + SandboxConfig: &ateapipb.SandboxConfig{PauseImage: "pause@sha256:abc"}, + Phase: &ateapipb.ActorTemplateVersionPhase{Phase: ateapipb.ActorTemplateVersionPhase_PHASE_INITIAL}, + } +} + +func TestActorTemplateLifecycle(t *testing.T) { + _, s, ctx := setupTest(t) + + want := newTestActorTemplate("team-a", "tmpl-a") + created, err := s.CreateActorTemplate(ctx, want) + if err != nil { + t.Fatalf("CreateActorTemplate failed: %v", err) + } + if created.GetMetadata().GetUid() == "" { + t.Errorf("CreateActorTemplate returned empty uid; want server-assigned uid") + } + if created.GetMetadata().GetVersion() != 1 { + t.Errorf("CreateActorTemplate returned version %d, want 1", created.GetMetadata().GetVersion()) + } + if created.GetMetadata().GetCreateTime() == nil || created.GetMetadata().GetUpdateTime() == nil { + t.Errorf("CreateActorTemplate returned unset create/update time") + } + // The input must not be mutated. + if want.GetMetadata().GetUid() != "" || want.GetMetadata().GetVersion() != 0 { + t.Errorf("CreateActorTemplate must not mutate its input, got metadata %v", want.GetMetadata()) + } + + got, err := s.GetActorTemplate(ctx, resources.ActorTemplateRef{Atespace: "team-a", Name: "tmpl-a"}) + if err != nil { + t.Fatalf("GetActorTemplate failed: %v", err) + } + if diff := cmp.Diff(created, got, protocmp.Transform()); diff != "" { + t.Errorf("CreateActorTemplate return does not match stored state (-created +got):\n%s", diff) + } + + list, _, err := s.ListActorTemplates(ctx, "team-a", 1000, "") + if err != nil { + t.Fatalf("ListActorTemplates failed: %v", err) + } + if len(list) != 1 || list[0].GetMetadata().GetName() != "tmpl-a" { + t.Errorf("ListActorTemplates = %v, want [tmpl-a]", list) + } + + deleted, err := s.DeleteActorTemplate(ctx, resources.ActorTemplateRef{Atespace: "team-a", Name: "tmpl-a"}) + if err != nil { + t.Fatalf("DeleteActorTemplate failed: %v", err) + } + if diff := cmp.Diff(created, deleted, protocmp.Transform()); diff != "" { + t.Errorf("DeleteActorTemplate returned unexpected resource (-created +deleted):\n%s", diff) + } + if _, err := s.GetActorTemplate(ctx, resources.ActorTemplateRef{Atespace: "team-a", Name: "tmpl-a"}); !errors.Is(err, store.ErrNotFound) { + t.Errorf("after delete, GetActorTemplate = %v, want ErrNotFound", err) + } +} + +func TestCreateActorTemplate_AlreadyExists(t *testing.T) { + _, s, ctx := setupTest(t) + + if _, err := s.CreateActorTemplate(ctx, newTestActorTemplate("team-a", "tmpl-a")); err != nil { + t.Fatalf("first CreateActorTemplate failed: %v", err) + } + if _, err := s.CreateActorTemplate(ctx, newTestActorTemplate("team-a", "tmpl-a")); !errors.Is(err, store.ErrAlreadyExists) { + t.Errorf("expected ErrAlreadyExists, got %v", err) + } +} + +func TestGetActorTemplate_NotFound(t *testing.T) { + _, s, ctx := setupTest(t) + + if _, err := s.GetActorTemplate(ctx, resources.ActorTemplateRef{Atespace: "team-a", Name: "nope"}); !errors.Is(err, store.ErrNotFound) { + t.Errorf("expected ErrNotFound, got %v", err) + } +} + +func TestActorTemplateExists(t *testing.T) { + _, s, ctx := setupTest(t) + + if ok, err := s.ActorTemplateExists(ctx, resources.ActorTemplateRef{Atespace: "team-a", Name: "tmpl-a"}); err != nil || ok { + t.Fatalf("ActorTemplateExists before create = (%v, %v), want (false, nil)", ok, err) + } + if _, err := s.CreateActorTemplate(ctx, newTestActorTemplate("team-a", "tmpl-a")); err != nil { + t.Fatalf("CreateActorTemplate failed: %v", err) + } + if ok, err := s.ActorTemplateExists(ctx, resources.ActorTemplateRef{Atespace: "team-a", Name: "tmpl-a"}); err != nil || !ok { + t.Fatalf("ActorTemplateExists after create = (%v, %v), want (true, nil)", ok, err) + } +} + +func TestUpdateActorTemplate_Success(t *testing.T) { + _, s, ctx := setupTest(t) + + created, err := s.CreateActorTemplate(ctx, newTestActorTemplate("team-a", "tmpl-a")) + if err != nil { + t.Fatalf("CreateActorTemplate failed: %v", err) + } + + updated, err := s.UpdateActorTemplate(ctx, resources.ActorTemplateRef{Atespace: "team-a", Name: "tmpl-a"}, func(dbTemplate *ateapipb.ActorTemplate) error { + dbTemplate.DefaultVersionOnCreate = &ateapipb.ObjectRef{Atespace: "team-a", Name: "tmpl-a-v1"} + return nil + }) + if err != nil { + t.Fatalf("UpdateActorTemplate failed: %v", err) + } + + // UpdateActorTemplate returns the stored resource: the mutation applied and + // version advanced, with uid and create_time preserved from creation. + if got := updated.GetDefaultVersionOnCreate().GetName(); got != "tmpl-a-v1" { + t.Errorf("default_version_on_create = %q, want %q", got, "tmpl-a-v1") + } + if updated.GetMetadata().GetVersion() != 2 { + t.Errorf("UpdateActorTemplate returned version %d, want 2", updated.GetMetadata().GetVersion()) + } + if updated.GetMetadata().GetUid() != created.GetMetadata().GetUid() { + t.Errorf("uid changed on update: got %q, want %q", updated.GetMetadata().GetUid(), created.GetMetadata().GetUid()) + } + if !updated.GetMetadata().GetCreateTime().AsTime().Equal(created.GetMetadata().GetCreateTime().AsTime()) { + t.Errorf("create_time changed on update: got %v, want %v", updated.GetMetadata().GetCreateTime().AsTime(), created.GetMetadata().GetCreateTime().AsTime()) + } + + // The returned resource is exactly what GetActorTemplate reads back. + got, err := s.GetActorTemplate(ctx, resources.ActorTemplateRef{Atespace: "team-a", Name: "tmpl-a"}) + if err != nil { + t.Fatalf("GetActorTemplate failed: %v", err) + } + if diff := cmp.Diff(updated, got, protocmp.Transform()); diff != "" { + t.Errorf("UpdateActorTemplate return does not match stored state (-updated +got):\n%s", diff) + } +} + +func TestUpdateActorTemplate_MutateErrorsAreNotRetried(t *testing.T) { + _, s, ctx := setupTest(t) + + created, err := s.CreateActorTemplate(ctx, newTestActorTemplate("team-a", "tmpl-a")) + if err != nil { + t.Fatalf("CreateActorTemplate failed: %v", err) + } + + var mutationError = errors.New("mutation error") + + callsToMutateFn := 0 + _, err = s.UpdateActorTemplate(ctx, resources.ActorTemplateRef{Atespace: "team-a", Name: "tmpl-a"}, func(dbTemplate *ateapipb.ActorTemplate) error { + callsToMutateFn++ + dbTemplate.DefaultVersionOnCreate = &ateapipb.ObjectRef{Atespace: "team-a", Name: "tmpl-a-v1"} + return fmt.Errorf("template tmpl-a: %w", mutationError) + }) + // The error must arrive intact + if !errors.Is(err, mutationError) { + t.Errorf("UpdateActorTemplate error = %v, want one wrapping mutationError", err) + } + // Mutation errors are non-retriable + if callsToMutateFn != 1 { + t.Errorf("mutate ran %d times, want exactly 1 (a rejected precondition must not be retried)", callsToMutateFn) + } + + got, err := s.GetActorTemplate(ctx, resources.ActorTemplateRef{Atespace: "team-a", Name: "tmpl-a"}) + if err != nil { + t.Fatalf("GetActorTemplate failed: %v", err) + } + if diff := cmp.Diff(created, got, protocmp.Transform()); diff != "" { + t.Errorf("aborted mutation was persisted (-created +got):\n%s", diff) + } +} + +func TestUpdateActorTemplate_DiscardsServerOwnedFieldsEdits(t *testing.T) { + _, s, ctx := setupTest(t) + + created, err := s.CreateActorTemplate(ctx, newTestActorTemplate("team-a", "tmpl-a")) + if err != nil { + t.Fatalf("CreateActorTemplate failed: %v", err) + } + + updated, err := s.UpdateActorTemplate(ctx, resources.ActorTemplateRef{Atespace: "team-a", Name: "tmpl-a"}, func(dbTemplate *ateapipb.ActorTemplate) error { + // Metadata is server-owned: a closure must not be able to change it. + dbTemplate.Metadata.Uid = "forged-uid" + dbTemplate.Metadata.Version = 99 + dbTemplate.Metadata.CreateTime = nil + dbTemplate.Metadata.UpdateTime = nil + dbTemplate.DefaultVersionOnCreate = &ateapipb.ObjectRef{Atespace: "team-a", Name: "tmpl-a-v1"} + return nil + }) + if err != nil { + t.Fatalf("UpdateActorTemplate failed: %v", err) + } + + if got := updated.GetMetadata().GetUid(); got != created.GetMetadata().GetUid() { + t.Errorf("uid = %q, want the server-assigned %q", got, created.GetMetadata().GetUid()) + } + if got := updated.GetMetadata().GetVersion(); got != created.GetMetadata().GetVersion()+1 { + t.Errorf("version = %d, want %d (one past the stored version, not the forged value)", got, created.GetMetadata().GetVersion()+1) + } + if got := updated.GetMetadata().GetCreateTime(); got == nil || !got.AsTime().Equal(created.GetMetadata().GetCreateTime().AsTime()) { + t.Errorf("create_time = %v, want the creation value %v", got, created.GetMetadata().GetCreateTime()) + } + if got := updated.GetDefaultVersionOnCreate().GetName(); got != "tmpl-a-v1" { + t.Errorf("default_version_on_create = %q, want %q: discarding metadata edits must not discard the mutation", got, "tmpl-a-v1") + } +} + +// TestUpdateActorTemplate_RejectsImmutableFieldChange covers the fields a +// mutation may not touch. Unlike the server-owned metadata, which is silently +// restored, these fail the call: a caller that renamed a template asked for +// something the store cannot do, and must hear about it. +func TestUpdateActorTemplate_RejectsImmutableFieldChange(t *testing.T) { + tests := []struct { + name string + mutate func(dbTemplate *ateapipb.ActorTemplate) + wantField string + }{ + { + name: "atespace", + mutate: func(dbTemplate *ateapipb.ActorTemplate) { dbTemplate.Metadata.Atespace = "other-atespace" }, + wantField: "metadata.atespace", + }, + { + name: "name", + mutate: func(dbTemplate *ateapipb.ActorTemplate) { dbTemplate.Metadata.Name = "other-name" }, + wantField: "metadata.name", + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + _, s, ctx := setupTest(t) + created, err := s.CreateActorTemplate(ctx, newTestActorTemplate("team-a", "tmpl-a")) + if err != nil { + t.Fatalf("CreateActorTemplate failed: %v", err) + } + + _, err = s.UpdateActorTemplate(ctx, resources.ActorTemplateRef{Atespace: "team-a", Name: "tmpl-a"}, func(dbTemplate *ateapipb.ActorTemplate) error { + // Paired with a legitimate edit, so the rejection cannot be + // mistaken for a no-op mutation. + dbTemplate.DefaultVersionOnCreate = &ateapipb.ObjectRef{Atespace: "team-a", Name: "tmpl-a-v1"} + tt.mutate(dbTemplate) + return nil + }) + // The message must name the offending field: the closure is buggy, + // and whoever has to fix it only has this error to go on. + if want := tt.wantField + " is immutable"; err == nil || !strings.Contains(err.Error(), want) { + t.Errorf("UpdateActorTemplate changing %s = %v, want an error containing %q", tt.name, err, want) + } + + got, err := s.GetActorTemplate(ctx, resources.ActorTemplateRef{Atespace: "team-a", Name: "tmpl-a"}) + if err != nil { + t.Fatalf("GetActorTemplate failed: %v", err) + } + if diff := cmp.Diff(created, got, protocmp.Transform()); diff != "" { + t.Errorf("rejected mutation was persisted anyway (-created +got):\n%s", diff) + } + }) + } +} + +func TestUpdateActorTemplate_RetriesOnConcurrentWrite(t *testing.T) { + mr, s, ctx := setupTest(t) + if _, err := s.CreateActorTemplate(ctx, newTestActorTemplate("team-a", "tmpl-a")); err != nil { + t.Fatalf("CreateActorTemplate failed: %v", err) + } + + // A separate client, so its write lands outside the transaction's connection. + otherClient := redis.NewClusterClient(&redis.ClusterOptions{Addrs: []string{mr.Addr()}}) + t.Cleanup(func() { otherClient.Close() }) + + attempts := 0 + interceptor := &watchInterceptor{redisClient: s.rdb, before: func() { + // Only the first attempt races. We do this to make sure the second retry + // will succeed. + if attempts > 0 { + return + } + concurrent, err := s.GetActorTemplate(ctx, resources.ActorTemplateRef{Atespace: "team-a", Name: "tmpl-a"}) + if err != nil { + t.Errorf("GetActorTemplate for concurrent write failed: %v", err) + return + } + concurrent.DefaultVersionOnCreate = &ateapipb.ObjectRef{Atespace: "team-a", Name: "tmpl-a-v1"} + val, err := protojson.Marshal(concurrent) + if err != nil { + t.Errorf("protojson.Marshal failed: %v", err) + return + } + if err := otherClient.Set(ctx, actorTemplateDBKey(resources.ActorTemplateRef{Atespace: "team-a", Name: "tmpl-a"}), val, 0).Err(); err != nil { + t.Errorf("concurrent Set failed: %v", err) + } + }} + racing := &Persistence{rdb: interceptor, lockTTL: defaultLockTTL} + + updated, err := racing.UpdateActorTemplate(ctx, resources.ActorTemplateRef{Atespace: "team-a", Name: "tmpl-a"}, func(dbTemplate *ateapipb.ActorTemplate) error { + attempts++ + // The template's only mutable field belongs to the concurrent writer + // in this test; an empty mutation still exercises the retry path. + return nil + }) + if err != nil { + t.Fatalf("UpdateActorTemplate failed: %v", err) + } + if attempts < 2 { + t.Errorf("mutate ran %d times, want at least 2: the first write is racey and must be rejected", attempts) + } + // The concurrent tx wrote default_version_on_create. This change should + // survive instead of being reverted by a mutation computed against the + // older state. + if got := updated.GetDefaultVersionOnCreate().GetName(); got != "tmpl-a-v1" { + t.Errorf("default_version_on_create = %q, want %q: the retry clobbered the concurrent write", got, "tmpl-a-v1") + } +} + +func TestUpdateActorTemplate_NotFound(t *testing.T) { + _, s, ctx := setupTest(t) + _, err := s.UpdateActorTemplate(ctx, resources.ActorTemplateRef{Atespace: "team-a", Name: "non-existent"}, func(dbTemplate *ateapipb.ActorTemplate) error { + t.Error("mutate must not run for a missing template") + return nil + }) + if !errors.Is(err, store.ErrNotFound) { + t.Errorf("expected store.ErrNotFound, got %v", err) + } +} + +func TestUpdateActorTemplate_RejectsStaleVersion(t *testing.T) { + _, s, ctx := setupTest(t) + + created, err := s.CreateActorTemplate(ctx, newTestActorTemplate("team-a", "tmpl-a")) + if err != nil { + t.Fatalf("CreateActorTemplate failed: %v", err) + } + staleVersion := created.GetMetadata().GetVersion() + + if _, err := s.UpdateActorTemplate(ctx, resources.ActorTemplateRef{Atespace: "team-a", Name: "tmpl-a"}, func(dbTemplate *ateapipb.ActorTemplate) error { + dbTemplate.DefaultVersionOnCreate = &ateapipb.ObjectRef{Atespace: "team-a", Name: "tmpl-a-v1"} + return nil + }); err != nil { + t.Fatalf("UpdateActorTemplate failed: %v", err) + } + + _, err = s.UpdateActorTemplate(ctx, resources.ActorTemplateRef{Atespace: "team-a", Name: "tmpl-a"}, func(dbTemplate *ateapipb.ActorTemplate) error { + if err := store.CheckActorTemplatePrecondition(dbTemplate, created.GetMetadata().GetUid(), staleVersion); err != nil { + return err + } + t.Error("mutate ran past its precondition once the pinned version had moved") + dbTemplate.DefaultVersionOnCreate = nil + return nil + }) + if !errors.Is(err, store.ErrVersionConflict) { + t.Errorf("UpdateActorTemplate error = %v, want one matching store.ErrVersionConflict", err) + } + // The uid still matches, so this is not the incarnation failure: callers key + // their retry decision off the difference. + if errors.Is(err, store.ErrUIDConflict) { + t.Errorf("UpdateActorTemplate error = %v, want no store.ErrUIDConflict match: the incarnation is unchanged", err) + } +} + +func TestDeleteActorTemplate_NotFound(t *testing.T) { + _, s, ctx := setupTest(t) + + if _, err := s.DeleteActorTemplate(ctx, resources.ActorTemplateRef{Atespace: "team-a", Name: "nope"}); !errors.Is(err, store.ErrNotFound) { + t.Errorf("expected ErrNotFound, got %v", err) + } +} + +func TestDeleteActorTemplate_HasVersions_Rejected(t *testing.T) { + _, s, ctx := setupTest(t) + + if _, err := s.CreateActorTemplate(ctx, newTestActorTemplate("team-a", "tmpl-a")); err != nil { + t.Fatalf("CreateActorTemplate failed: %v", err) + } + // A version parented to a DIFFERENT template must not block the delete. + if _, err := s.CreateActorTemplateVersion(ctx, newTestActorTemplateVersion("team-a", "tmpl-b-v1", "tmpl-b")); err != nil { + t.Fatalf("CreateActorTemplateVersion failed: %v", err) + } + if _, err := s.CreateActorTemplateVersion(ctx, newTestActorTemplateVersion("team-a", "tmpl-a-v1", "tmpl-a")); err != nil { + t.Fatalf("CreateActorTemplateVersion failed: %v", err) + } + + if _, err := s.DeleteActorTemplate(ctx, resources.ActorTemplateRef{Atespace: "team-a", Name: "tmpl-a"}); !errors.Is(err, store.ErrFailedPrecondition) { + t.Fatalf("DeleteActorTemplate with versions = %v, want ErrFailedPrecondition", err) + } + // The template must survive a rejected delete. + if _, err := s.GetActorTemplate(ctx, resources.ActorTemplateRef{Atespace: "team-a", Name: "tmpl-a"}); err != nil { + t.Fatalf("template should still exist after rejected delete, got %v", err) + } + + if _, err := s.DeleteActorTemplateVersion(ctx, resources.ActorTemplateVersionRef{Atespace: "team-a", Name: "tmpl-a-v1"}); err != nil { + t.Fatalf("DeleteActorTemplateVersion failed: %v", err) + } + if _, err := s.DeleteActorTemplate(ctx, resources.ActorTemplateRef{Atespace: "team-a", Name: "tmpl-a"}); err != nil { + t.Errorf("DeleteActorTemplate after versions removed = %v, want nil", err) + } +} + +func TestActorTemplateVersionLifecycle(t *testing.T) { + _, s, ctx := setupTest(t) + + want := newTestActorTemplateVersion("team-a", "tmpl-a-v1", "tmpl-a") + created, err := s.CreateActorTemplateVersion(ctx, want) + if err != nil { + t.Fatalf("CreateActorTemplateVersion failed: %v", err) + } + if created.GetMetadata().GetUid() == "" { + t.Errorf("CreateActorTemplateVersion returned empty uid; want server-assigned uid") + } + if created.GetMetadata().GetVersion() != 1 { + t.Errorf("CreateActorTemplateVersion returned version %d, want 1", created.GetMetadata().GetVersion()) + } + // The caller-built spec and status are persisted verbatim. + if diff := cmp.Diff(want, created, protocmp.Transform(), ignoreUID, ignoreVersion, ignoreTimestamps); diff != "" { + t.Errorf("CreateActorTemplateVersion returned unexpected resource (-want +got):\n%s", diff) + } + + got, err := s.GetActorTemplateVersion(ctx, resources.ActorTemplateVersionRef{Atespace: "team-a", Name: "tmpl-a-v1"}) + if err != nil { + t.Fatalf("GetActorTemplateVersion failed: %v", err) + } + if diff := cmp.Diff(created, got, protocmp.Transform()); diff != "" { + t.Errorf("CreateActorTemplateVersion return does not match stored state (-created +got):\n%s", diff) + } + + deleted, err := s.DeleteActorTemplateVersion(ctx, resources.ActorTemplateVersionRef{Atespace: "team-a", Name: "tmpl-a-v1"}) + if err != nil { + t.Fatalf("DeleteActorTemplateVersion failed: %v", err) + } + if diff := cmp.Diff(created, deleted, protocmp.Transform()); diff != "" { + t.Errorf("DeleteActorTemplateVersion returned unexpected resource (-created +deleted):\n%s", diff) + } + if _, err := s.GetActorTemplateVersion(ctx, resources.ActorTemplateVersionRef{Atespace: "team-a", Name: "tmpl-a-v1"}); !errors.Is(err, store.ErrNotFound) { + t.Errorf("after delete, GetActorTemplateVersion = %v, want ErrNotFound", err) + } +} + +func TestCreateActorTemplateVersion_AlreadyExists(t *testing.T) { + _, s, ctx := setupTest(t) + + if _, err := s.CreateActorTemplateVersion(ctx, newTestActorTemplateVersion("team-a", "v1", "tmpl-a")); err != nil { + t.Fatalf("first CreateActorTemplateVersion failed: %v", err) + } + if _, err := s.CreateActorTemplateVersion(ctx, newTestActorTemplateVersion("team-a", "v1", "tmpl-a")); !errors.Is(err, store.ErrAlreadyExists) { + t.Errorf("expected ErrAlreadyExists, got %v", err) + } +} + +func TestDeleteActorTemplateVersion_IsParentDefault_Rejected(t *testing.T) { + _, s, ctx := setupTest(t) + + if _, err := s.CreateActorTemplate(ctx, newTestActorTemplate("team-a", "tmpl-a")); err != nil { + t.Fatalf("CreateActorTemplate failed: %v", err) + } + if _, err := s.CreateActorTemplateVersion(ctx, newTestActorTemplateVersion("team-a", "tmpl-a-v1", "tmpl-a")); err != nil { + t.Fatalf("CreateActorTemplateVersion failed: %v", err) + } + if _, err := s.UpdateActorTemplate(ctx, resources.ActorTemplateRef{Atespace: "team-a", Name: "tmpl-a"}, func(dbTemplate *ateapipb.ActorTemplate) error { + dbTemplate.DefaultVersionOnCreate = &ateapipb.ObjectRef{Atespace: "team-a", Name: "tmpl-a-v1"} + return nil + }); err != nil { + t.Fatalf("UpdateActorTemplate failed: %v", err) + } + + if _, err := s.DeleteActorTemplateVersion(ctx, resources.ActorTemplateVersionRef{Atespace: "team-a", Name: "tmpl-a-v1"}); !errors.Is(err, store.ErrFailedPrecondition) { + t.Fatalf("DeleteActorTemplateVersion while default = %v, want ErrFailedPrecondition", err) + } + // The version must survive a rejected delete. + if _, err := s.GetActorTemplateVersion(ctx, resources.ActorTemplateVersionRef{Atespace: "team-a", Name: "tmpl-a-v1"}); err != nil { + t.Fatalf("version should still exist after rejected delete, got %v", err) + } + + // Clearing the default unblocks the delete. + if _, err := s.UpdateActorTemplate(ctx, resources.ActorTemplateRef{Atespace: "team-a", Name: "tmpl-a"}, func(dbTemplate *ateapipb.ActorTemplate) error { + dbTemplate.DefaultVersionOnCreate = nil + return nil + }); err != nil { + t.Fatalf("UpdateActorTemplate (clear default) failed: %v", err) + } + if _, err := s.DeleteActorTemplateVersion(ctx, resources.ActorTemplateVersionRef{Atespace: "team-a", Name: "tmpl-a-v1"}); err != nil { + t.Errorf("DeleteActorTemplateVersion after clearing default = %v, want nil", err) + } +} + +func TestDeleteActorTemplateVersion_MissingParent_Allowed(t *testing.T) { + _, s, ctx := setupTest(t) + + if _, err := s.CreateActorTemplateVersion(ctx, newTestActorTemplateVersion("team-a", "orphan-v1", "gone")); err != nil { + t.Fatalf("CreateActorTemplateVersion failed: %v", err) + } + if _, err := s.DeleteActorTemplateVersion(ctx, resources.ActorTemplateVersionRef{Atespace: "team-a", Name: "orphan-v1"}); err != nil { + t.Errorf("DeleteActorTemplateVersion with missing parent = %v, want nil", err) + } +} + +func TestDeleteActorTemplateVersion_DeletesGoldenSnapshot(t *testing.T) { + _, s, ctx := setupTest(t) + + if _, err := s.CreateActorSnapshot(ctx, &ateapipb.ActorSnapshot{ + Metadata: &ateapipb.ResourceMetadata{Atespace: "ate-golden", Name: "golden-1"}, + SnapshotUri: "gs://bucket/root/snapshots/ate-golden/golden-1", + }); err != nil { + t.Fatalf("CreateActorSnapshot failed: %v", err) + } + version := newTestActorTemplateVersion("team-a", "tmpl-a-v1", "tmpl-a") + version.GoldenSnapshot = &ateapipb.ObjectRef{Atespace: "ate-golden", Name: "golden-1"} + if _, err := s.CreateActorTemplateVersion(ctx, version); err != nil { + t.Fatalf("CreateActorTemplateVersion failed: %v", err) + } + + if _, err := s.DeleteActorTemplateVersion(ctx, resources.ActorTemplateVersionRef{Atespace: "team-a", Name: "tmpl-a-v1"}); err != nil { + t.Fatalf("DeleteActorTemplateVersion failed: %v", err) + } + if _, err := s.GetActorSnapshot(ctx, "ate-golden", "golden-1"); !errors.Is(err, store.ErrNotFound) { + t.Errorf("golden snapshot after delete = %v, want ErrNotFound", err) + } +} + +func TestDeleteActorTemplateVersion_GoldenSnapshotAlreadyGone(t *testing.T) { + _, s, ctx := setupTest(t) + + version := newTestActorTemplateVersion("team-a", "tmpl-a-v1", "tmpl-a") + version.GoldenSnapshot = &ateapipb.ObjectRef{Atespace: "ate-golden", Name: "never-created"} + if _, err := s.CreateActorTemplateVersion(ctx, version); err != nil { + t.Fatalf("CreateActorTemplateVersion failed: %v", err) + } + if _, err := s.DeleteActorTemplateVersion(ctx, resources.ActorTemplateVersionRef{Atespace: "team-a", Name: "tmpl-a-v1"}); err != nil { + t.Errorf("DeleteActorTemplateVersion with missing golden snapshot = %v, want nil", err) + } +} + +func TestListActorTemplates_Pagination(t *testing.T) { + _, s, ctx := setupTest(t) + + for i := 0; i < 5; i++ { + if _, err := s.CreateActorTemplate(ctx, newTestActorTemplate("team-a", fmt.Sprintf("tmpl-%d", i))); err != nil { + t.Fatalf("failed to create template %d: %v", i, err) + } + } + + var all []*ateapipb.ActorTemplate + pageToken := "" + for { + templates, nextToken, err := s.ListActorTemplates(ctx, "team-a", 2, pageToken) + if err != nil { + t.Fatalf("ListActorTemplates failed: %v", err) + } + all = append(all, templates...) + pageToken = nextToken + if pageToken == "" { + break + } + } + + if len(all) != 5 { + t.Fatalf("expected 5 templates total, got %d", len(all)) + } + seen := make(map[string]bool) + for _, tmpl := range all { + if seen[tmpl.GetMetadata().GetName()] { + t.Errorf("duplicate template found in paginated results: %s", tmpl.GetMetadata().GetName()) + } + seen[tmpl.GetMetadata().GetName()] = true + } +} + +func TestListActorTemplateVersions_ParentFilter(t *testing.T) { + _, s, ctx := setupTest(t) + + // Interleave versions of two templates. + for i := 0; i < 3; i++ { + if _, err := s.CreateActorTemplateVersion(ctx, newTestActorTemplateVersion("team-a", fmt.Sprintf("tmpl-a-v%d", i), "tmpl-a")); err != nil { + t.Fatalf("failed to create tmpl-a version %d: %v", i, err) + } + } + for i := 0; i < 2; i++ { + if _, err := s.CreateActorTemplateVersion(ctx, newTestActorTemplateVersion("team-a", fmt.Sprintf("tmpl-b-v%d", i), "tmpl-b")); err != nil { + t.Fatalf("failed to create tmpl-b version %d: %v", i, err) + } + } + + unfiltered, _, err := s.ListActorTemplateVersions(ctx, "team-a", resources.ActorTemplateRef{}, 1000, "") + if err != nil { + t.Fatalf("ListActorTemplateVersions(all) failed: %v", err) + } + if len(unfiltered) != 5 { + t.Fatalf("unfiltered list returned %d versions, want 5", len(unfiltered)) + } + + // Filtered list, paged with a small page size to exercise the + // matched-count pagination semantics. + var filtered []*ateapipb.ActorTemplateVersion + pageToken := "" + for { + versions, nextToken, err := s.ListActorTemplateVersions(ctx, "team-a", resources.ActorTemplateRef{Atespace: "team-a", Name: "tmpl-a"}, 2, pageToken) + if err != nil { + t.Fatalf("ListActorTemplateVersions(tmpl-a) failed: %v", err) + } + filtered = append(filtered, versions...) + pageToken = nextToken + if pageToken == "" { + break + } + } + + if len(filtered) != 3 { + t.Fatalf("filtered list returned %d versions, want 3", len(filtered)) + } + seen := make(map[string]bool) + for _, v := range filtered { + if v.GetActorTemplate().GetName() != "tmpl-a" { + t.Errorf("filtered list returned version %q of template %q", v.GetMetadata().GetName(), v.GetActorTemplate().GetName()) + } + if seen[v.GetMetadata().GetName()] { + t.Errorf("duplicate version found in paginated results: %s", v.GetMetadata().GetName()) + } + seen[v.GetMetadata().GetName()] = true + } + + // The filter matches the parent's atespace too: scanning all atespaces + // with team-a's tmpl-a must not pick up team-b versions whose parent + // merely shares the name. + if _, err := s.CreateActorTemplateVersion(ctx, newTestActorTemplateVersion("team-b", "tmpl-a-v0", "tmpl-a")); err != nil { + t.Fatalf("failed to create team-b version: %v", err) + } + crossAtespace, _, err := s.ListActorTemplateVersions(ctx, "", resources.ActorTemplateRef{Atespace: "team-a", Name: "tmpl-a"}, 1000, "") + if err != nil { + t.Fatalf("ListActorTemplateVersions(all atespaces, team-a/tmpl-a) failed: %v", err) + } + if len(crossAtespace) != 3 { + t.Errorf("cross-atespace filtered list returned %d versions, want 3: team-b/tmpl-a versions must not match", len(crossAtespace)) + } +} + +func TestActorTemplates_AtespaceIsolation(t *testing.T) { + _, s, ctx := setupTest(t) + + // The same name in two atespaces is two distinct resources. + inA, err := s.CreateActorTemplate(ctx, newTestActorTemplate("team-a", "tmpl")) + if err != nil { + t.Fatalf("CreateActorTemplate in team-a failed: %v", err) + } + inB, err := s.CreateActorTemplate(ctx, newTestActorTemplate("team-b", "tmpl")) + if err != nil { + t.Fatalf("CreateActorTemplate in team-b = %v, want nil: the name is only taken in team-a", err) + } + if inA.GetMetadata().GetUid() == inB.GetMetadata().GetUid() { + t.Fatalf("templates in different atespaces share uid %q", inA.GetMetadata().GetUid()) + } + + got, err := s.GetActorTemplate(ctx, resources.ActorTemplateRef{Atespace: "team-b", Name: "tmpl"}) + if err != nil { + t.Fatalf("GetActorTemplate(team-b) failed: %v", err) + } + if got.GetMetadata().GetUid() != inB.GetMetadata().GetUid() { + t.Errorf("GetActorTemplate(team-b) returned uid %q, want team-b's %q", got.GetMetadata().GetUid(), inB.GetMetadata().GetUid()) + } + + // The wrong atespace is a clean NotFound, not an internal error. + if _, err := s.GetActorTemplate(ctx, resources.ActorTemplateRef{Atespace: "team-c", Name: "tmpl"}); !errors.Is(err, store.ErrNotFound) { + t.Errorf("GetActorTemplate(team-c) = %v, want ErrNotFound", err) + } + if ok, err := s.ActorTemplateExists(ctx, resources.ActorTemplateRef{Atespace: "team-c", Name: "tmpl"}); err != nil || ok { + t.Errorf("ActorTemplateExists(team-c) = (%v, %v), want (false, nil)", ok, err) + } + + // Deleting in one atespace leaves the other's untouched. + if _, err := s.DeleteActorTemplate(ctx, resources.ActorTemplateRef{Atespace: "team-a", Name: "tmpl"}); err != nil { + t.Fatalf("DeleteActorTemplate(team-a) failed: %v", err) + } + if _, err := s.GetActorTemplate(ctx, resources.ActorTemplateRef{Atespace: "team-b", Name: "tmpl"}); err != nil { + t.Errorf("GetActorTemplate(team-b) after deleting team-a's = %v, want nil", err) + } +} + +func TestListActorTemplates_AtespaceFilter(t *testing.T) { + _, s, ctx := setupTest(t) + + for _, tmpl := range []struct{ atespace, name string }{ + {"team-a", "tmpl-1"}, {"team-a", "tmpl-2"}, {"team-b", "tmpl-3"}, + } { + if _, err := s.CreateActorTemplate(ctx, newTestActorTemplate(tmpl.atespace, tmpl.name)); err != nil { + t.Fatalf("CreateActorTemplate(%s/%s) failed: %v", tmpl.atespace, tmpl.name, err) + } + } + + scoped, _, err := s.ListActorTemplates(ctx, "team-a", 1000, "") + if err != nil { + t.Fatalf("ListActorTemplates(team-a) failed: %v", err) + } + if len(scoped) != 2 { + t.Errorf("ListActorTemplates(team-a) returned %d templates, want 2", len(scoped)) + } + for _, tmpl := range scoped { + if got := tmpl.GetMetadata().GetAtespace(); got != "team-a" { + t.Errorf("scoped list leaked template %q from atespace %q", tmpl.GetMetadata().GetName(), got) + } + } + + all, _, err := s.ListActorTemplates(ctx, "", 1000, "") + if err != nil { + t.Fatalf("ListActorTemplates(all) failed: %v", err) + } + if len(all) != 3 { + t.Errorf("ListActorTemplates(all) returned %d templates, want 3", len(all)) + } +} + +func TestActorTemplateVersions_AtespaceIsolation(t *testing.T) { + _, s, ctx := setupTest(t) + + if _, err := s.CreateActorTemplateVersion(ctx, newTestActorTemplateVersion("team-a", "tmpl-v1", "tmpl")); err != nil { + t.Fatalf("CreateActorTemplateVersion in team-a failed: %v", err) + } + if _, err := s.CreateActorTemplateVersion(ctx, newTestActorTemplateVersion("team-b", "tmpl-v1", "tmpl")); err != nil { + t.Fatalf("CreateActorTemplateVersion in team-b = %v, want nil: the name is only taken in team-a", err) + } + + // The wrong atespace is a clean NotFound, not an internal error. + if _, err := s.GetActorTemplateVersion(ctx, resources.ActorTemplateVersionRef{Atespace: "team-c", Name: "tmpl-v1"}); !errors.Is(err, store.ErrNotFound) { + t.Errorf("GetActorTemplateVersion(team-c) = %v, want ErrNotFound", err) + } + + // Versions of the same-named parent list per atespace. + scoped, _, err := s.ListActorTemplateVersions(ctx, "team-a", resources.ActorTemplateRef{Atespace: "team-a", Name: "tmpl"}, 1000, "") + if err != nil { + t.Fatalf("ListActorTemplateVersions(team-a, tmpl) failed: %v", err) + } + if len(scoped) != 1 || scoped[0].GetMetadata().GetAtespace() != "team-a" { + t.Errorf("ListActorTemplateVersions(team-a, tmpl) = %v, want team-a's tmpl-v1 only", scoped) + } + + // Deleting in one atespace leaves the other's untouched. + if _, err := s.DeleteActorTemplateVersion(ctx, resources.ActorTemplateVersionRef{Atespace: "team-a", Name: "tmpl-v1"}); err != nil { + t.Fatalf("DeleteActorTemplateVersion(team-a) failed: %v", err) + } + if _, err := s.GetActorTemplateVersion(ctx, resources.ActorTemplateVersionRef{Atespace: "team-b", Name: "tmpl-v1"}); err != nil { + t.Errorf("GetActorTemplateVersion(team-b) after deleting team-a's = %v, want nil", err) + } +} + +func TestDeleteActorTemplate_VersionInOtherAtespace_NotBlocking(t *testing.T) { + _, s, ctx := setupTest(t) + + if _, err := s.CreateActorTemplate(ctx, newTestActorTemplate("team-a", "tmpl-a")); err != nil { + t.Fatalf("CreateActorTemplate failed: %v", err) + } + // A version of a same-named template in ANOTHER atespace must not block + // the delete. + if _, err := s.CreateActorTemplateVersion(ctx, newTestActorTemplateVersion("team-b", "tmpl-a-v1", "tmpl-a")); err != nil { + t.Fatalf("CreateActorTemplateVersion failed: %v", err) + } + if _, err := s.DeleteActorTemplate(ctx, resources.ActorTemplateRef{Atespace: "team-a", Name: "tmpl-a"}); err != nil { + t.Errorf("DeleteActorTemplate = %v, want nil: the only version lives in team-b", err) + } +} diff --git a/cmd/ateapi/internal/store/store.go b/cmd/ateapi/internal/store/store.go index 9c020d183..21a856a9d 100644 --- a/cmd/ateapi/internal/store/store.go +++ b/cmd/ateapi/internal/store/store.go @@ -121,6 +121,51 @@ type Interface interface { // (e.g. there are actors in it). DeleteAtespace(ctx context.Context, name string) (*ateapipb.Atespace, error) + // Stores a new ActorTemplate and returns the stored resource with + // server-assigned metadata (uid, version, timestamps). The input is not + // mutated. Returns ErrAlreadyExists if the (atespace, name) is taken. + CreateActorTemplate(ctx context.Context, template *ateapipb.ActorTemplate) (*ateapipb.ActorTemplate, error) + + // Fetches an ActorTemplate by reference. Returns ErrNotFound if missing. + GetActorTemplate(ctx context.Context, templateRef resources.ActorTemplateRef) (*ateapipb.ActorTemplate, error) + + // ActorTemplateExists reports whether the ActorTemplate exists. + ActorTemplateExists(ctx context.Context, templateRef resources.ActorTemplateRef) (bool, error) + + // UpdateActorTemplate performs a transactional read-modify-write and returns + // the updated template with advanced metadata (version, update_time). + UpdateActorTemplate(ctx context.Context, templateRef resources.ActorTemplateRef, mutate func(dbTemplate *ateapipb.ActorTemplate) error) (*ateapipb.ActorTemplate, error) + + // Lists ActorTemplates in an atespace, or across all atespaces when + // atespace is empty. Returns a page of templates and a next page token. + ListActorTemplates(ctx context.Context, atespace string, pageSize int32, pageToken string) ([]*ateapipb.ActorTemplate, string, error) + + // Removes an ActorTemplate and returns the deleted resource. Returns + // ErrNotFound if missing, or ErrFailedPrecondition while any + // ActorTemplateVersion still names it as parent. + DeleteActorTemplate(ctx context.Context, templateRef resources.ActorTemplateRef) (*ateapipb.ActorTemplate, error) + + // Stores a new ActorTemplateVersion and returns the stored resource with + // server-assigned metadata. The caller is responsible for the + // parent-exists check and for initializing the status fields. The input is not + // mutated. Returns ErrAlreadyExists if the (atespace, name) is taken. + CreateActorTemplateVersion(ctx context.Context, version *ateapipb.ActorTemplateVersion) (*ateapipb.ActorTemplateVersion, error) + + // Fetches an ActorTemplateVersion by reference. Returns ErrNotFound if + // missing. + GetActorTemplateVersion(ctx context.Context, versionRef resources.ActorTemplateVersionRef) (*ateapipb.ActorTemplateVersion, error) + + // Lists ActorTemplateVersions in an atespace (all atespaces when atespace + // is empty), filtered to one parent template when actorTemplateRef is + // non-zero. The parent lives in the same atespace as its versions. + ListActorTemplateVersions(ctx context.Context, atespace string, actorTemplateRef resources.ActorTemplateRef, pageSize int32, pageToken string) ([]*ateapipb.ActorTemplateVersion, string, error) + + // Removes an ActorTemplateVersion and returns the deleted resource, also + // deleting the golden snapshot recorded in golden_snapshot, if any. + // Returns ErrNotFound if missing, or ErrFailedPrecondition while the + // version is its parent's default_version_on_create. + DeleteActorTemplateVersion(ctx context.Context, versionRef resources.ActorTemplateVersionRef) (*ateapipb.ActorTemplateVersion, error) + // Fetches worker state by namespace, pool, and pod name. Returns ErrNotFound if missing. GetWorker(ctx context.Context, namespace, pool, pod string) (*ateapipb.Worker, error) @@ -169,7 +214,17 @@ const ( // outside of it. Returns ErrUIDConflict or ErrVersionConflict, which UpdateActor // surfaces verbatim. func CheckActorPrecondition(dbActor *ateapipb.Actor, uid string, version int64) error { - md := dbActor.GetMetadata() + return checkPrecondition(dbActor.GetMetadata(), uid, version) +} + +// CheckActorTemplatePrecondition is CheckActorPrecondition for ActorTemplates: +// call it at the top of an UpdateActorTemplate mutation to pin the uid and +// version the caller observed. +func CheckActorTemplatePrecondition(dbTemplate *ateapipb.ActorTemplate, uid string, version int64) error { + return checkPrecondition(dbTemplate.GetMetadata(), uid, version) +} + +func checkPrecondition(md *ateapipb.ResourceMetadata, uid string, version int64) error { if uid != AnyUID && uid != md.GetUid() { return ErrUIDConflict } diff --git a/internal/resources/actortemplateref.go b/internal/resources/actortemplateref.go new file mode 100644 index 000000000..c3862a777 --- /dev/null +++ b/internal/resources/actortemplateref.go @@ -0,0 +1,111 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package resources + +import ( + "log/slog" + + "github.com/agent-substrate/substrate/pkg/proto/ateapipb" +) + +// ActorTemplateRef identifies an ActorTemplate by the (atespace, name). +// +// ActorTemplateRef is the in-process form of the identity that +// ateapipb.ObjectRef carries on the wire. +type ActorTemplateRef struct { + // Atespace is the isolation boundary the template was created into. Required. + Atespace string + // Name is the template's name, unique within Atespace. Required. + Name string +} + +func (r ActorTemplateRef) String() string { + return r.Atespace + "/" + r.Name +} + +// LogValue implements slog.LogValuer so that slog.Any("template", ref) records +// the two components as a group ("template.atespace", "template.name") rather +// than flattening them into one opaque string. +func (r ActorTemplateRef) LogValue() slog.Value { + return slog.GroupValue( + slog.String("atespace", r.Atespace), + slog.String("name", r.Name), + ) +} + +// ToObjectRef converts the reference to its wire form. +func (r ActorTemplateRef) ToObjectRef() *ateapipb.ObjectRef { + return &ateapipb.ObjectRef{Atespace: r.Atespace, Name: r.Name} +} + +// ActorTemplateRefFromObjectRef converts a wire reference to an ActorTemplateRef. +func ActorTemplateRefFromObjectRef(ref *ateapipb.ObjectRef) ActorTemplateRef { + return ActorTemplateRef{Atespace: ref.GetAtespace(), Name: ref.GetName()} +} + +// ActorTemplateRefFromActorTemplate returns the reference addressing the given +// template. +func ActorTemplateRefFromActorTemplate(t *ateapipb.ActorTemplate) ActorTemplateRef { + return ActorTemplateRef{ + Atespace: t.GetMetadata().GetAtespace(), + Name: t.GetMetadata().GetName(), + } +} + +// ActorTemplateVersionRef identifies an ActorTemplateVersion by the +// (atespace, name). +// +// ActorTemplateVersionRef is the in-process form of the identity that +// ateapipb.ObjectRef carries on the wire. +type ActorTemplateVersionRef struct { + // Atespace is the isolation boundary the version was created into. Required. + Atespace string + // Name is the version's name, unique within Atespace. Required. + Name string +} + +func (r ActorTemplateVersionRef) String() string { + return r.Atespace + "/" + r.Name +} + +// LogValue implements slog.LogValuer so that slog.Any("version", ref) records +// the two components as a group ("version.atespace", "version.name") rather +// than flattening them into one opaque string. +func (r ActorTemplateVersionRef) LogValue() slog.Value { + return slog.GroupValue( + slog.String("atespace", r.Atespace), + slog.String("name", r.Name), + ) +} + +// ToObjectRef converts the reference to its wire form. +func (r ActorTemplateVersionRef) ToObjectRef() *ateapipb.ObjectRef { + return &ateapipb.ObjectRef{Atespace: r.Atespace, Name: r.Name} +} + +// ActorTemplateVersionRefFromObjectRef converts a wire reference to an +// ActorTemplateVersionRef. +func ActorTemplateVersionRefFromObjectRef(ref *ateapipb.ObjectRef) ActorTemplateVersionRef { + return ActorTemplateVersionRef{Atespace: ref.GetAtespace(), Name: ref.GetName()} +} + +// ActorTemplateVersionRefFromActorTemplateVersion returns the reference +// addressing the given version. +func ActorTemplateVersionRefFromActorTemplateVersion(v *ateapipb.ActorTemplateVersion) ActorTemplateVersionRef { + return ActorTemplateVersionRef{ + Atespace: v.GetMetadata().GetAtespace(), + Name: v.GetMetadata().GetName(), + } +} diff --git a/internal/resources/actortemplateref_test.go b/internal/resources/actortemplateref_test.go new file mode 100644 index 000000000..20470484d --- /dev/null +++ b/internal/resources/actortemplateref_test.go @@ -0,0 +1,111 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package resources + +import ( + "testing" + + "github.com/agent-substrate/substrate/pkg/proto/ateapipb" +) + +func TestActorTemplateRefString(t *testing.T) { + got := ActorTemplateRef{Atespace: "team-a", Name: "tmpl-1"}.String() + if want := "team-a/tmpl-1"; got != want { + t.Errorf("String() = %q, want %q", got, want) + } +} + +func TestActorTemplateRefObjectRefRoundTrip(t *testing.T) { + templateRef := ActorTemplateRef{Atespace: "team-a", Name: "tmpl-1"} + + obj := templateRef.ToObjectRef() + if obj.GetAtespace() != "team-a" || obj.GetName() != "tmpl-1" { + t.Errorf("ToObjectRef() = (%q, %q), want (team-a, tmpl-1)", obj.GetAtespace(), obj.GetName()) + } + if got := ActorTemplateRefFromObjectRef(obj); got != templateRef { + t.Errorf("round-trip = %+v, want %+v", got, templateRef) + } +} + +func TestActorTemplateRefFromActorTemplate(t *testing.T) { + tests := []struct { + name string + template *ateapipb.ActorTemplate + want ActorTemplateRef + }{ + { + name: "populated", + template: &ateapipb.ActorTemplate{Metadata: &ateapipb.ResourceMetadata{ + Atespace: "team-a", + Name: "tmpl-1", + }}, + want: ActorTemplateRef{Atespace: "team-a", Name: "tmpl-1"}, + }, + {"nil template", nil, ActorTemplateRef{}}, + {"nil metadata", &ateapipb.ActorTemplate{}, ActorTemplateRef{}}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + if got := ActorTemplateRefFromActorTemplate(tt.template); got != tt.want { + t.Errorf("ActorTemplateRefFromActorTemplate() = %+v, want %+v", got, tt.want) + } + }) + } +} + +func TestActorTemplateVersionRefString(t *testing.T) { + got := ActorTemplateVersionRef{Atespace: "team-a", Name: "tmpl-1-v1"}.String() + if want := "team-a/tmpl-1-v1"; got != want { + t.Errorf("String() = %q, want %q", got, want) + } +} + +func TestActorTemplateVersionRefObjectRefRoundTrip(t *testing.T) { + versionRef := ActorTemplateVersionRef{Atespace: "team-a", Name: "tmpl-1-v1"} + + obj := versionRef.ToObjectRef() + if obj.GetAtespace() != "team-a" || obj.GetName() != "tmpl-1-v1" { + t.Errorf("ToObjectRef() = (%q, %q), want (team-a, tmpl-1-v1)", obj.GetAtespace(), obj.GetName()) + } + if got := ActorTemplateVersionRefFromObjectRef(obj); got != versionRef { + t.Errorf("round-trip = %+v, want %+v", got, versionRef) + } +} + +func TestActorTemplateVersionRefFromActorTemplateVersion(t *testing.T) { + tests := []struct { + name string + version *ateapipb.ActorTemplateVersion + want ActorTemplateVersionRef + }{ + { + name: "populated", + version: &ateapipb.ActorTemplateVersion{Metadata: &ateapipb.ResourceMetadata{ + Atespace: "team-a", + Name: "tmpl-1-v1", + }}, + want: ActorTemplateVersionRef{Atespace: "team-a", Name: "tmpl-1-v1"}, + }, + {"nil version", nil, ActorTemplateVersionRef{}}, + {"nil metadata", &ateapipb.ActorTemplateVersion{}, ActorTemplateVersionRef{}}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + if got := ActorTemplateVersionRefFromActorTemplateVersion(tt.version); got != tt.want { + t.Errorf("ActorTemplateVersionRefFromActorTemplateVersion() = %+v, want %+v", got, tt.want) + } + }) + } +} diff --git a/pkg/proto/ateapipb/ateapi.pb.go b/pkg/proto/ateapipb/ateapi.pb.go index 87b290519..713113091 100644 --- a/pkg/proto/ateapipb/ateapi.pb.go +++ b/pkg/proto/ateapipb/ateapi.pb.go @@ -138,6 +138,112 @@ func (ActorSnapshotTagScope) EnumDescriptor() ([]byte, []int) { return file_ateapi_proto_rawDescGZIP(), []int{1} } +// SandboxClass selects the sandbox runtime family. Snapshots are not portable +// across classes. +type SandboxClass int32 + +const ( + SandboxClass_SANDBOX_CLASS_UNSPECIFIED SandboxClass = 0 + SandboxClass_SANDBOX_CLASS_GVISOR SandboxClass = 1 + SandboxClass_SANDBOX_CLASS_MICROVM SandboxClass = 2 +) + +// Enum value maps for SandboxClass. +var ( + SandboxClass_name = map[int32]string{ + 0: "SANDBOX_CLASS_UNSPECIFIED", + 1: "SANDBOX_CLASS_GVISOR", + 2: "SANDBOX_CLASS_MICROVM", + } + SandboxClass_value = map[string]int32{ + "SANDBOX_CLASS_UNSPECIFIED": 0, + "SANDBOX_CLASS_GVISOR": 1, + "SANDBOX_CLASS_MICROVM": 2, + } +) + +func (x SandboxClass) Enum() *SandboxClass { + p := new(SandboxClass) + *p = x + return p +} + +func (x SandboxClass) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SandboxClass) Descriptor() protoreflect.EnumDescriptor { + return file_ateapi_proto_enumTypes[2].Descriptor() +} + +func (SandboxClass) Type() protoreflect.EnumType { + return &file_ateapi_proto_enumTypes[2] +} + +func (x SandboxClass) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SandboxClass.Descriptor instead. +func (SandboxClass) EnumDescriptor() ([]byte, []int) { + return file_ateapi_proto_rawDescGZIP(), []int{2} +} + +// ResumeSource selects what supplies the guest state when an actor is resumed +// from one of the snapshot situations named by OnResumeConfig's fields. +type ResumeSource int32 + +const ( + ResumeSource_RESUME_SOURCE_UNSPECIFIED ResumeSource = 0 + // Starts the actor's containers afresh from the OCI image, with the + // durable-dir volumes pre-populated from the snapshot. + ResumeSource_RESUME_SOURCE_COLD_BOOT ResumeSource = 1 + // Restores with the version's golden snapshot and the actor's own + // durable data. + ResumeSource_RESUME_SOURCE_GOLDEN ResumeSource = 2 +) + +// Enum value maps for ResumeSource. +var ( + ResumeSource_name = map[int32]string{ + 0: "RESUME_SOURCE_UNSPECIFIED", + 1: "RESUME_SOURCE_COLD_BOOT", + 2: "RESUME_SOURCE_GOLDEN", + } + ResumeSource_value = map[string]int32{ + "RESUME_SOURCE_UNSPECIFIED": 0, + "RESUME_SOURCE_COLD_BOOT": 1, + "RESUME_SOURCE_GOLDEN": 2, + } +) + +func (x ResumeSource) Enum() *ResumeSource { + p := new(ResumeSource) + *p = x + return p +} + +func (x ResumeSource) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ResumeSource) Descriptor() protoreflect.EnumDescriptor { + return file_ateapi_proto_enumTypes[3].Descriptor() +} + +func (ResumeSource) Type() protoreflect.EnumType { + return &file_ateapi_proto_enumTypes[3] +} + +func (x ResumeSource) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ResumeSource.Descriptor instead. +func (ResumeSource) EnumDescriptor() ([]byte, []int) { + return file_ateapi_proto_rawDescGZIP(), []int{3} +} + type ActorCertificatePurpose int32 const ( @@ -168,11 +274,11 @@ func (x ActorCertificatePurpose) String() string { } func (ActorCertificatePurpose) Descriptor() protoreflect.EnumDescriptor { - return file_ateapi_proto_enumTypes[2].Descriptor() + return file_ateapi_proto_enumTypes[4].Descriptor() } func (ActorCertificatePurpose) Type() protoreflect.EnumType { - return &file_ateapi_proto_enumTypes[2] + return &file_ateapi_proto_enumTypes[4] } func (x ActorCertificatePurpose) Number() protoreflect.EnumNumber { @@ -181,7 +287,7 @@ func (x ActorCertificatePurpose) Number() protoreflect.EnumNumber { // Deprecated: Use ActorCertificatePurpose.Descriptor instead. func (ActorCertificatePurpose) EnumDescriptor() ([]byte, []int) { - return file_ateapi_proto_rawDescGZIP(), []int{2} + return file_ateapi_proto_rawDescGZIP(), []int{4} } type ExternalVolume_Status int32 @@ -223,11 +329,11 @@ func (x ExternalVolume_Status) String() string { } func (ExternalVolume_Status) Descriptor() protoreflect.EnumDescriptor { - return file_ateapi_proto_enumTypes[3].Descriptor() + return file_ateapi_proto_enumTypes[5].Descriptor() } func (ExternalVolume_Status) Type() protoreflect.EnumType { - return &file_ateapi_proto_enumTypes[3] + return &file_ateapi_proto_enumTypes[5] } func (x ExternalVolume_Status) Number() protoreflect.EnumNumber { @@ -290,11 +396,11 @@ func (x Actor_Status) String() string { } func (Actor_Status) Descriptor() protoreflect.EnumDescriptor { - return file_ateapi_proto_enumTypes[4].Descriptor() + return file_ateapi_proto_enumTypes[6].Descriptor() } func (Actor_Status) Type() protoreflect.EnumType { - return &file_ateapi_proto_enumTypes[4] + return &file_ateapi_proto_enumTypes[6] } func (x Actor_Status) Number() protoreflect.EnumNumber { @@ -306,6 +412,64 @@ func (Actor_Status) EnumDescriptor() ([]byte, []int) { return file_ateapi_proto_rawDescGZIP(), []int{4, 0} } +type ActorTemplateVersionPhase_Phase int32 + +const ( + ActorTemplateVersionPhase_PHASE_UNSPECIFIED ActorTemplateVersionPhase_Phase = 0 + ActorTemplateVersionPhase_PHASE_INITIAL ActorTemplateVersionPhase_Phase = 1 + ActorTemplateVersionPhase_PHASE_RESUME_GOLDEN_ACTOR ActorTemplateVersionPhase_Phase = 2 + ActorTemplateVersionPhase_PHASE_WAIT_GOLDEN_ACTOR ActorTemplateVersionPhase_Phase = 3 + ActorTemplateVersionPhase_PHASE_READY ActorTemplateVersionPhase_Phase = 4 + ActorTemplateVersionPhase_PHASE_FAILED ActorTemplateVersionPhase_Phase = 5 +) + +// Enum value maps for ActorTemplateVersionPhase_Phase. +var ( + ActorTemplateVersionPhase_Phase_name = map[int32]string{ + 0: "PHASE_UNSPECIFIED", + 1: "PHASE_INITIAL", + 2: "PHASE_RESUME_GOLDEN_ACTOR", + 3: "PHASE_WAIT_GOLDEN_ACTOR", + 4: "PHASE_READY", + 5: "PHASE_FAILED", + } + ActorTemplateVersionPhase_Phase_value = map[string]int32{ + "PHASE_UNSPECIFIED": 0, + "PHASE_INITIAL": 1, + "PHASE_RESUME_GOLDEN_ACTOR": 2, + "PHASE_WAIT_GOLDEN_ACTOR": 3, + "PHASE_READY": 4, + "PHASE_FAILED": 5, + } +) + +func (x ActorTemplateVersionPhase_Phase) Enum() *ActorTemplateVersionPhase_Phase { + p := new(ActorTemplateVersionPhase_Phase) + *p = x + return p +} + +func (x ActorTemplateVersionPhase_Phase) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ActorTemplateVersionPhase_Phase) Descriptor() protoreflect.EnumDescriptor { + return file_ateapi_proto_enumTypes[7].Descriptor() +} + +func (ActorTemplateVersionPhase_Phase) Type() protoreflect.EnumType { + return &file_ateapi_proto_enumTypes[7] +} + +func (x ActorTemplateVersionPhase_Phase) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ActorTemplateVersionPhase_Phase.Descriptor instead. +func (ActorTemplateVersionPhase_Phase) EnumDescriptor() ([]byte, []int) { + return file_ateapi_proto_rawDescGZIP(), []int{14, 0} +} + type Worker_State int32 const ( @@ -339,11 +503,11 @@ func (x Worker_State) String() string { } func (Worker_State) Descriptor() protoreflect.EnumDescriptor { - return file_ateapi_proto_enumTypes[5].Descriptor() + return file_ateapi_proto_enumTypes[8].Descriptor() } func (Worker_State) Type() protoreflect.EnumType { - return &file_ateapi_proto_enumTypes[5] + return &file_ateapi_proto_enumTypes[8] } func (x Worker_State) Number() protoreflect.EnumNumber { @@ -352,7 +516,7 @@ func (x Worker_State) Number() protoreflect.EnumNumber { // Deprecated: Use Worker_State.Descriptor instead. func (Worker_State) EnumDescriptor() ([]byte, []int) { - return file_ateapi_proto_rawDescGZIP(), []int{36, 0} + return file_ateapi_proto_rawDescGZIP(), []int{65, 0} } type LocalSnapshotInfo struct { @@ -644,10 +808,12 @@ func (x *ExternalVolume) GetVolumeContext() map[string]string { type Actor struct { state protoimpl.MessageState `protogen:"open.v1"` // Common resource metadata: atespace, name, uid, version, timestamps. - Metadata *ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` - ActorTemplateNamespace string `protobuf:"bytes,2,opt,name=actor_template_namespace,json=actorTemplateNamespace,proto3" json:"actor_template_namespace,omitempty"` - ActorTemplateName string `protobuf:"bytes,3,opt,name=actor_template_name,json=actorTemplateName,proto3" json:"actor_template_name,omitempty"` - Status Actor_Status `protobuf:"varint,4,opt,name=status,proto3,enum=ateapi.Actor_Status" json:"status,omitempty"` + Metadata *ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + // TODO: delete both fields once we start using actor_template_version below. + ActorTemplateNamespace string `protobuf:"bytes,2,opt,name=actor_template_namespace,json=actorTemplateNamespace,proto3" json:"actor_template_namespace,omitempty"` + ActorTemplateName string `protobuf:"bytes,3,opt,name=actor_template_name,json=actorTemplateName,proto3" json:"actor_template_name,omitempty"` + ActorTemplateVersion *ObjectRef `protobuf:"bytes,13,opt,name=actor_template_version,json=actorTemplateVersion,proto3" json:"actor_template_version,omitempty"` + Status Actor_Status `protobuf:"varint,4,opt,name=status,proto3,enum=ateapi.Actor_Status" json:"status,omitempty"` // worker_assignment points at the worker currently hosting this Actor. // Unset whenever the Actor has no worker (SUSPENDED, PAUSED, CRASHED). WorkerAssignment *WorkerAssignment `protobuf:"bytes,5,opt,name=worker_assignment,json=workerAssignment,proto3" json:"worker_assignment,omitempty"` @@ -722,6 +888,13 @@ func (x *Actor) GetActorTemplateName() string { return "" } +func (x *Actor) GetActorTemplateVersion() *ObjectRef { + if x != nil { + return x.ActorTemplateVersion + } + return nil +} + func (x *Actor) GetStatus() Actor_Status { if x != nil { return x.Status @@ -880,8 +1053,10 @@ type ActorSnapshot struct { ActorTemplateUid string `protobuf:"bytes,7,opt,name=actor_template_uid,json=actorTemplateUid,proto3" json:"actor_template_uid,omitempty"` ContentScope SnapshotContentScope `protobuf:"varint,8,opt,name=content_scope,json=contentScope,proto3,enum=ateapi.SnapshotContentScope" json:"content_scope,omitempty"` SnapshotUri string `protobuf:"bytes,9,opt,name=snapshot_uri,json=snapshotUri,proto3" json:"snapshot_uri,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + // Immutable reference to the actor_template_version where the snapshot was created from. + ActorTemplateVersion *ObjectRef `protobuf:"bytes,10,opt,name=actor_template_version,json=actorTemplateVersion,proto3" json:"actor_template_version,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ActorSnapshot) Reset() { @@ -977,6 +1152,13 @@ func (x *ActorSnapshot) GetSnapshotUri() string { return "" } +func (x *ActorSnapshot) GetActorTemplateVersion() *ObjectRef { + if x != nil { + return x.ActorTemplateVersion + } + return nil +} + // ActorSnapshotTag is an immutable, Atespace-owned alias and retention pin. // Its owning Atespace cannot be deleted until the tag is removed. type ActorSnapshotTag struct { @@ -1166,10 +1348,1821 @@ func (x *ActorSnapshotRef) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ActorSnapshotRef) ProtoMessage() {} +func (*ActorSnapshotRef) ProtoMessage() {} + +func (x *ActorSnapshotRef) ProtoReflect() protoreflect.Message { + mi := &file_ateapi_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActorSnapshotRef.ProtoReflect.Descriptor instead. +func (*ActorSnapshotRef) Descriptor() ([]byte, []int) { + return file_ateapi_proto_rawDescGZIP(), []int{10} +} + +func (x *ActorSnapshotRef) GetReference() isActorSnapshotRef_Reference { + if x != nil { + return x.Reference + } + return nil +} + +func (x *ActorSnapshotRef) GetSnapshot() *ObjectRef { + if x != nil { + if x, ok := x.Reference.(*ActorSnapshotRef_Snapshot); ok { + return x.Snapshot + } + } + return nil +} + +func (x *ActorSnapshotRef) GetTag() *ObjectRef { + if x != nil { + if x, ok := x.Reference.(*ActorSnapshotRef_Tag); ok { + return x.Tag + } + } + return nil +} + +type isActorSnapshotRef_Reference interface { + isActorSnapshotRef_Reference() +} + +type ActorSnapshotRef_Snapshot struct { + Snapshot *ObjectRef `protobuf:"bytes,1,opt,name=snapshot,proto3,oneof"` +} + +type ActorSnapshotRef_Tag struct { + Tag *ObjectRef `protobuf:"bytes,2,opt,name=tag,proto3,oneof"` +} + +func (*ActorSnapshotRef_Snapshot) isActorSnapshotRef_Reference() {} + +func (*ActorSnapshotRef_Tag) isActorSnapshotRef_Reference() {} + +// ActorTemplateRef addresses a template by its canonical identity or by an +// Atespace-owned ActorTemplateVersion. +type ActorTemplateRef struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Reference: + // + // *ActorTemplateRef_ActorTemplateVersion + // *ActorTemplateRef_ActorTemplate + Reference isActorTemplateRef_Reference `protobuf_oneof:"reference"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ActorTemplateRef) Reset() { + *x = ActorTemplateRef{} + mi := &file_ateapi_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ActorTemplateRef) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActorTemplateRef) ProtoMessage() {} + +func (x *ActorTemplateRef) ProtoReflect() protoreflect.Message { + mi := &file_ateapi_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActorTemplateRef.ProtoReflect.Descriptor instead. +func (*ActorTemplateRef) Descriptor() ([]byte, []int) { + return file_ateapi_proto_rawDescGZIP(), []int{11} +} + +func (x *ActorTemplateRef) GetReference() isActorTemplateRef_Reference { + if x != nil { + return x.Reference + } + return nil +} + +func (x *ActorTemplateRef) GetActorTemplateVersion() *ObjectRef { + if x != nil { + if x, ok := x.Reference.(*ActorTemplateRef_ActorTemplateVersion); ok { + return x.ActorTemplateVersion + } + } + return nil +} + +func (x *ActorTemplateRef) GetActorTemplate() *ObjectRef { + if x != nil { + if x, ok := x.Reference.(*ActorTemplateRef_ActorTemplate); ok { + return x.ActorTemplate + } + } + return nil +} + +type isActorTemplateRef_Reference interface { + isActorTemplateRef_Reference() +} + +type ActorTemplateRef_ActorTemplateVersion struct { + ActorTemplateVersion *ObjectRef `protobuf:"bytes,1,opt,name=actor_template_version,json=actorTemplateVersion,proto3,oneof"` +} + +type ActorTemplateRef_ActorTemplate struct { + ActorTemplate *ObjectRef `protobuf:"bytes,2,opt,name=actor_template,json=actorTemplate,proto3,oneof"` +} + +func (*ActorTemplateRef_ActorTemplateVersion) isActorTemplateRef_Reference() {} + +func (*ActorTemplateRef_ActorTemplate) isActorTemplateRef_Reference() {} + +// ActorTemplate an mutable, Atespace-owned resource that points to a default +// ActorTemplateVersion to be used when creating Actors. +type ActorTemplate struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Common resource metadata: atespace, name, uid, version, timestamps. + Metadata *ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + // default_version_on_create names the ActorTemplateVersion used by + // CreateActor calls that do not pin a version. If unset, CreateActor + // without an explicit version fails with FailedPrecondition. + DefaultVersionOnCreate *ObjectRef `protobuf:"bytes,3,opt,name=default_version_on_create,json=defaultVersionOnCreate,proto3" json:"default_version_on_create,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ActorTemplate) Reset() { + *x = ActorTemplate{} + mi := &file_ateapi_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ActorTemplate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActorTemplate) ProtoMessage() {} + +func (x *ActorTemplate) ProtoReflect() protoreflect.Message { + mi := &file_ateapi_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActorTemplate.ProtoReflect.Descriptor instead. +func (*ActorTemplate) Descriptor() ([]byte, []int) { + return file_ateapi_proto_rawDescGZIP(), []int{12} +} + +func (x *ActorTemplate) GetMetadata() *ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *ActorTemplate) GetDefaultVersionOnCreate() *ObjectRef { + if x != nil { + return x.DefaultVersionOnCreate + } + return nil +} + +// ActorTemplateVersion is one immutable released version of an ActorTemplate: +// the workload definition plus everything that affects snapshot validity. +// The workload definition (pause_image through sandbox_config) is immutable +// after creation; golden_snapshot, state, resolved_sandbox and message are +// server-owned status fields. +// ActorTemplateVersion is Atespaced. +type ActorTemplateVersion struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Common resource metadata: atespace, name, uid, version, timestamps. + Metadata *ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + // actor_template is the parent ActorTemplate. Required at creation and + // immutable. + ActorTemplate *ObjectRef `protobuf:"bytes,2,opt,name=actor_template,json=actorTemplate,proto3" json:"actor_template,omitempty"` + // worker_selector restricts which worker pools actors from this template + // may use. + WorkerSelector *Selector `protobuf:"bytes,3,opt,name=worker_selector,json=workerSelector,proto3" json:"worker_selector,omitempty"` + Containers []*Container `protobuf:"bytes,4,rep,name=containers,proto3" json:"containers,omitempty"` + Volumes []*Volume `protobuf:"bytes,5,rep,name=volumes,proto3" json:"volumes,omitempty"` + SnapshotsConfig *SnapshotsConfig `protobuf:"bytes,6,opt,name=snapshots_config,json=snapshotsConfig,proto3" json:"snapshots_config,omitempty"` + // sandbox_config selects the sandbox runtime this version's actors run on. + // Required. Resolved and frozen into resolved_sandbox at creation time. + SandboxConfig *SandboxConfig `protobuf:"bytes,7,opt,name=sandbox_config,json=sandboxConfig,proto3" json:"sandbox_config,omitempty"` + // golden_snapshot points at the ActorSnapshot, in the reserved ate-golden + // system atespace, built for this version by ate-api. Set once state is + // READY. + GoldenSnapshot *ObjectRef `protobuf:"bytes,8,opt,name=golden_snapshot,json=goldenSnapshot,proto3" json:"golden_snapshot,omitempty"` + // State machine, mirroring the ActorTemplateVersion CRD PhaseType: + // INITIAL -> RESUME_GOLDEN_ACTOR -> WAIT_GOLDEN_ACTOR -> {READY | FAILED}. + // READY and FAILED are terminal; the version is only usable once READY. + Phase *ActorTemplateVersionPhase `protobuf:"bytes,9,opt,name=phase,proto3" json:"phase,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ActorTemplateVersion) Reset() { + *x = ActorTemplateVersion{} + mi := &file_ateapi_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ActorTemplateVersion) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActorTemplateVersion) ProtoMessage() {} + +func (x *ActorTemplateVersion) ProtoReflect() protoreflect.Message { + mi := &file_ateapi_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActorTemplateVersion.ProtoReflect.Descriptor instead. +func (*ActorTemplateVersion) Descriptor() ([]byte, []int) { + return file_ateapi_proto_rawDescGZIP(), []int{13} +} + +func (x *ActorTemplateVersion) GetMetadata() *ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *ActorTemplateVersion) GetActorTemplate() *ObjectRef { + if x != nil { + return x.ActorTemplate + } + return nil +} + +func (x *ActorTemplateVersion) GetWorkerSelector() *Selector { + if x != nil { + return x.WorkerSelector + } + return nil +} + +func (x *ActorTemplateVersion) GetContainers() []*Container { + if x != nil { + return x.Containers + } + return nil +} + +func (x *ActorTemplateVersion) GetVolumes() []*Volume { + if x != nil { + return x.Volumes + } + return nil +} + +func (x *ActorTemplateVersion) GetSnapshotsConfig() *SnapshotsConfig { + if x != nil { + return x.SnapshotsConfig + } + return nil +} + +func (x *ActorTemplateVersion) GetSandboxConfig() *SandboxConfig { + if x != nil { + return x.SandboxConfig + } + return nil +} + +func (x *ActorTemplateVersion) GetGoldenSnapshot() *ObjectRef { + if x != nil { + return x.GoldenSnapshot + } + return nil +} + +func (x *ActorTemplateVersion) GetPhase() *ActorTemplateVersionPhase { + if x != nil { + return x.Phase + } + return nil +} + +type ActorTemplateVersionPhase struct { + state protoimpl.MessageState `protogen:"open.v1"` + Phase ActorTemplateVersionPhase_Phase `protobuf:"varint,1,opt,name=phase,proto3,enum=ateapi.ActorTemplateVersionPhase_Phase" json:"phase,omitempty"` + // message is a human-readable explanation of the current state, most + // useful when the ActorTemplateVersion is FAILED. + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ActorTemplateVersionPhase) Reset() { + *x = ActorTemplateVersionPhase{} + mi := &file_ateapi_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ActorTemplateVersionPhase) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActorTemplateVersionPhase) ProtoMessage() {} + +func (x *ActorTemplateVersionPhase) ProtoReflect() protoreflect.Message { + mi := &file_ateapi_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActorTemplateVersionPhase.ProtoReflect.Descriptor instead. +func (*ActorTemplateVersionPhase) Descriptor() ([]byte, []int) { + return file_ateapi_proto_rawDescGZIP(), []int{14} +} + +func (x *ActorTemplateVersionPhase) GetPhase() ActorTemplateVersionPhase_Phase { + if x != nil { + return x.Phase + } + return ActorTemplateVersionPhase_PHASE_UNSPECIFIED +} + +func (x *ActorTemplateVersionPhase) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +// SandboxConfig selects the sandbox runtime for an ActorTemplateVersion. +type SandboxConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + // sandbox_class selects the sandbox runtime family. + // Required; must be specified.. + SandboxClass SandboxClass `protobuf:"varint,1,opt,name=sandbox_class,json=sandboxClass,proto3,enum=ateapi.SandboxClass" json:"sandbox_class,omitempty"` + // config_name names the cluster-scoped SandboxConfig Kubernetes object + // supplying the sandbox binaries. Required; must match sandbox_class. + ConfigName string `protobuf:"bytes,2,opt,name=config_name,json=configName,proto3" json:"config_name,omitempty"` + // sandbox_assets is the referenced SandboxConfig's content frozen at + // creation time. + SandboxAssets *SandboxAssets `protobuf:"bytes,3,opt,name=sandbox_assets,json=sandboxAssets,proto3" json:"sandbox_assets,omitempty"` + // pause_image is the container to use as the root sandbox container. + PauseImage string `protobuf:"bytes,4,opt,name=pause_image,json=pauseImage,proto3" json:"pause_image,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SandboxConfig) Reset() { + *x = SandboxConfig{} + mi := &file_ateapi_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SandboxConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SandboxConfig) ProtoMessage() {} + +func (x *SandboxConfig) ProtoReflect() protoreflect.Message { + mi := &file_ateapi_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SandboxConfig.ProtoReflect.Descriptor instead. +func (*SandboxConfig) Descriptor() ([]byte, []int) { + return file_ateapi_proto_rawDescGZIP(), []int{15} +} + +func (x *SandboxConfig) GetSandboxClass() SandboxClass { + if x != nil { + return x.SandboxClass + } + return SandboxClass_SANDBOX_CLASS_UNSPECIFIED +} + +func (x *SandboxConfig) GetConfigName() string { + if x != nil { + return x.ConfigName + } + return "" +} + +func (x *SandboxConfig) GetSandboxAssets() *SandboxAssets { + if x != nil { + return x.SandboxAssets + } + return nil +} + +func (x *SandboxConfig) GetPauseImage() string { + if x != nil { + return x.PauseImage + } + return "" +} + +type SnapshotsConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + // on_pause selects what is captured during pause actor. + OnPause SnapshotContentScope `protobuf:"varint,1,opt,name=on_pause,json=onPause,proto3,enum=ateapi.SnapshotContentScope" json:"on_pause,omitempty"` + // on_commit selects what captures. + // Must be a subset of on_pause: FULL allows FULL or DATA, DATA allows DATA. + OnCommit SnapshotContentScope `protobuf:"varint,2,opt,name=on_commit,json=onCommit,proto3,enum=ateapi.SnapshotContentScope" json:"on_commit,omitempty"` + // on_resume selects, per snapshot situation, what supplies the guest state + // at resume. Unset means the defaults documented on OnResumeConfig. + OnResume *OnResumeConfig `protobuf:"bytes,3,opt,name=on_resume,json=onResume,proto3" json:"on_resume,omitempty"` + // storage_location is the base object-storage URI snapshots of actors on + // this version are stored under. Required. + StorageLocation string `protobuf:"bytes,4,opt,name=storage_location,json=storageLocation,proto3" json:"storage_location,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SnapshotsConfig) Reset() { + *x = SnapshotsConfig{} + mi := &file_ateapi_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SnapshotsConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SnapshotsConfig) ProtoMessage() {} + +func (x *SnapshotsConfig) ProtoReflect() protoreflect.Message { + mi := &file_ateapi_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SnapshotsConfig.ProtoReflect.Descriptor instead. +func (*SnapshotsConfig) Descriptor() ([]byte, []int) { + return file_ateapi_proto_rawDescGZIP(), []int{16} +} + +func (x *SnapshotsConfig) GetOnPause() SnapshotContentScope { + if x != nil { + return x.OnPause + } + return SnapshotContentScope_SNAPSHOT_CONTENT_SCOPE_UNSPECIFIED +} + +func (x *SnapshotsConfig) GetOnCommit() SnapshotContentScope { + if x != nil { + return x.OnCommit + } + return SnapshotContentScope_SNAPSHOT_CONTENT_SCOPE_UNSPECIFIED +} + +func (x *SnapshotsConfig) GetOnResume() *OnResumeConfig { + if x != nil { + return x.OnResume + } + return nil +} + +func (x *SnapshotsConfig) GetStorageLocation() string { + if x != nil { + return x.StorageLocation + } + return "" +} + +// OnResumeConfig selects, per snapshot situation, what supplies the guest +// state at resume. Each field names what is being resumed FROM; the value +// names the boot source. Full snapshots that are still valid always restore +// from their own content and are not configurable here. +type OnResumeConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + // from_data applies when the resume uses a DATA-scope snapshot (from + // on_pause or on_commit). + FromData ResumeSource `protobuf:"varint,1,opt,name=from_data,json=fromData,proto3,enum=ateapi.ResumeSource" json:"from_data,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OnResumeConfig) Reset() { + *x = OnResumeConfig{} + mi := &file_ateapi_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OnResumeConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OnResumeConfig) ProtoMessage() {} + +func (x *OnResumeConfig) ProtoReflect() protoreflect.Message { + mi := &file_ateapi_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OnResumeConfig.ProtoReflect.Descriptor instead. +func (*OnResumeConfig) Descriptor() ([]byte, []int) { + return file_ateapi_proto_rawDescGZIP(), []int{17} +} + +func (x *OnResumeConfig) GetFromData() ResumeSource { + if x != nil { + return x.FromData + } + return ResumeSource_RESUME_SOURCE_UNSPECIFIED +} + +// Container is a single application container of an ActorTemplateVersion. +type Container struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Image string `protobuf:"bytes,2,opt,name=image,proto3" json:"image,omitempty"` + // Entrypoint array; when set, the image's ENTRYPOINT and CMD are both + // ignored and the process argv is command + args. Unlike Kubernetes, + // $(VAR_NAME) references are NOT expanded. + Command []string `protobuf:"bytes,3,rep,name=command,proto3" json:"command,omitempty"` + // Arguments to the entrypoint; the image's CMD is used if unset (unless + // command is set, which discards the image's CMD). + Args []string `protobuf:"bytes,4,rep,name=args,proto3" json:"args,omitempty"` + Env []*EnvVar `protobuf:"bytes,5,rep,name=env,proto3" json:"env,omitempty"` + // readyz is an optional HTTP readiness probe; when set the actor is not + // ready until the endpoint returns 200. + Readyz *ContainerReadyz `protobuf:"bytes,6,opt,name=readyz,proto3" json:"readyz,omitempty"` + VolumeMounts []*VolumeMount `protobuf:"bytes,7,rep,name=volume_mounts,json=volumeMounts,proto3" json:"volume_mounts,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Container) Reset() { + *x = Container{} + mi := &file_ateapi_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Container) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Container) ProtoMessage() {} + +func (x *Container) ProtoReflect() protoreflect.Message { + mi := &file_ateapi_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Container.ProtoReflect.Descriptor instead. +func (*Container) Descriptor() ([]byte, []int) { + return file_ateapi_proto_rawDescGZIP(), []int{18} +} + +func (x *Container) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Container) GetImage() string { + if x != nil { + return x.Image + } + return "" +} + +func (x *Container) GetCommand() []string { + if x != nil { + return x.Command + } + return nil +} + +func (x *Container) GetArgs() []string { + if x != nil { + return x.Args + } + return nil +} + +func (x *Container) GetEnv() []*EnvVar { + if x != nil { + return x.Env + } + return nil +} + +func (x *Container) GetReadyz() *ContainerReadyz { + if x != nil { + return x.Readyz + } + return nil +} + +func (x *Container) GetVolumeMounts() []*VolumeMount { + if x != nil { + return x.VolumeMounts + } + return nil +} + +// EnvVar supplies one environment variable to a container. Values are not +// expanded with Kubernetes-style $(VAR) references. +type EnvVar struct { + state protoimpl.MessageState `protogen:"open.v1"` + // name may be any printable ASCII character except '='. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Exactly one source must be set. + // + // Types that are valid to be assigned to Source: + // + // *EnvVar_Value + Source isEnvVar_Source `protobuf_oneof:"source"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EnvVar) Reset() { + *x = EnvVar{} + mi := &file_ateapi_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EnvVar) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EnvVar) ProtoMessage() {} + +func (x *EnvVar) ProtoReflect() protoreflect.Message { + mi := &file_ateapi_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EnvVar.ProtoReflect.Descriptor instead. +func (*EnvVar) Descriptor() ([]byte, []int) { + return file_ateapi_proto_rawDescGZIP(), []int{19} +} + +func (x *EnvVar) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *EnvVar) GetSource() isEnvVar_Source { + if x != nil { + return x.Source + } + return nil +} + +func (x *EnvVar) GetValue() string { + if x != nil { + if x, ok := x.Source.(*EnvVar_Value); ok { + return x.Value + } + } + return "" +} + +type isEnvVar_Source interface { + isEnvVar_Source() +} + +type EnvVar_Value struct { + // Literal value. + Value string `protobuf:"bytes,2,opt,name=value,proto3,oneof"` +} + +func (*EnvVar_Value) isEnvVar_Source() {} + +// ContainerReadyz configures the readiness signal for a container. +type ContainerReadyz struct { + state protoimpl.MessageState `protogen:"open.v1"` + // http_get specifies the HTTP request to perform. Required. + HttpGet *HTTPGetAction `protobuf:"bytes,1,opt,name=http_get,json=httpGet,proto3" json:"http_get,omitempty"` + // timeout_seconds bounds how long to poll http_get before failing the + // actor start. 0 means the server-applied default (30s). + TimeoutSeconds int32 `protobuf:"varint,2,opt,name=timeout_seconds,json=timeoutSeconds,proto3" json:"timeout_seconds,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ContainerReadyz) Reset() { + *x = ContainerReadyz{} + mi := &file_ateapi_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ContainerReadyz) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ContainerReadyz) ProtoMessage() {} + +func (x *ContainerReadyz) ProtoReflect() protoreflect.Message { + mi := &file_ateapi_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ContainerReadyz.ProtoReflect.Descriptor instead. +func (*ContainerReadyz) Descriptor() ([]byte, []int) { + return file_ateapi_proto_rawDescGZIP(), []int{20} +} + +func (x *ContainerReadyz) GetHttpGet() *HTTPGetAction { + if x != nil { + return x.HttpGet + } + return nil +} + +func (x *ContainerReadyz) GetTimeoutSeconds() int32 { + if x != nil { + return x.TimeoutSeconds + } + return 0 +} + +// HTTPGetAction describes an HTTP GET against the container's interior IP. +type HTTPGetAction struct { + state protoimpl.MessageState `protogen:"open.v1"` + // path defaults to "/readyz". + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` + Port int32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *HTTPGetAction) Reset() { + *x = HTTPGetAction{} + mi := &file_ateapi_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *HTTPGetAction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HTTPGetAction) ProtoMessage() {} + +func (x *HTTPGetAction) ProtoReflect() protoreflect.Message { + mi := &file_ateapi_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HTTPGetAction.ProtoReflect.Descriptor instead. +func (*HTTPGetAction) Descriptor() ([]byte, []int) { + return file_ateapi_proto_rawDescGZIP(), []int{21} +} + +func (x *HTTPGetAction) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *HTTPGetAction) GetPort() int32 { + if x != nil { + return x.Port + } + return 0 +} + +type Volume struct { + state protoimpl.MessageState `protogen:"open.v1"` + // name of the volume. Must be a DNS label. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Exactly one source must be set. + // + // Types that are valid to be assigned to Source: + // + // *Volume_DurableDir + // *Volume_ExternalVolumeTemplate + Source isVolume_Source `protobuf_oneof:"source"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Volume) Reset() { + *x = Volume{} + mi := &file_ateapi_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Volume) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Volume) ProtoMessage() {} + +func (x *Volume) ProtoReflect() protoreflect.Message { + mi := &file_ateapi_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Volume.ProtoReflect.Descriptor instead. +func (*Volume) Descriptor() ([]byte, []int) { + return file_ateapi_proto_rawDescGZIP(), []int{22} +} + +func (x *Volume) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Volume) GetSource() isVolume_Source { + if x != nil { + return x.Source + } + return nil +} + +func (x *Volume) GetDurableDir() *DurableDirVolumeSource { + if x != nil { + if x, ok := x.Source.(*Volume_DurableDir); ok { + return x.DurableDir + } + } + return nil +} + +func (x *Volume) GetExternalVolumeTemplate() *ExternalVolumeTemplate { + if x != nil { + if x, ok := x.Source.(*Volume_ExternalVolumeTemplate); ok { + return x.ExternalVolumeTemplate + } + } + return nil +} + +type isVolume_Source interface { + isVolume_Source() +} + +type Volume_DurableDir struct { + DurableDir *DurableDirVolumeSource `protobuf:"bytes,2,opt,name=durable_dir,json=durableDir,proto3,oneof"` +} + +type Volume_ExternalVolumeTemplate struct { + ExternalVolumeTemplate *ExternalVolumeTemplate `protobuf:"bytes,3,opt,name=external_volume_template,json=externalVolumeTemplate,proto3,oneof"` +} + +func (*Volume_DurableDir) isVolume_Source() {} + +func (*Volume_ExternalVolumeTemplate) isVolume_Source() {} + +// DurableDirVolumeSource is a durable directory on rootfs that persists +// across resumes and participates in snapshots. +type DurableDirVolumeSource struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DurableDirVolumeSource) Reset() { + *x = DurableDirVolumeSource{} + mi := &file_ateapi_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DurableDirVolumeSource) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DurableDirVolumeSource) ProtoMessage() {} + +func (x *DurableDirVolumeSource) ProtoReflect() protoreflect.Message { + mi := &file_ateapi_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DurableDirVolumeSource.ProtoReflect.Descriptor instead. +func (*DurableDirVolumeSource) Descriptor() ([]byte, []int) { + return file_ateapi_proto_rawDescGZIP(), []int{23} +} + +// ExternalVolumeTemplate provisions an external volume per actor; the volume +// lives only as long as the actor. Not supported with SANDBOX_CLASS_MICROVM. +type ExternalVolumeTemplate struct { + state protoimpl.MessageState `protogen:"open.v1"` + // capacity of the volume to create, in Kubernetes resource.Quantity string + // form (e.g. "10Gi"). Required. + Capacity string `protobuf:"bytes,1,opt,name=capacity,proto3" json:"capacity,omitempty"` + // storage_class_name names the cluster-scoped Kubernetes StorageClass to + // create the volume from. Required. + StorageClassName string `protobuf:"bytes,2,opt,name=storage_class_name,json=storageClassName,proto3" json:"storage_class_name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ExternalVolumeTemplate) Reset() { + *x = ExternalVolumeTemplate{} + mi := &file_ateapi_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ExternalVolumeTemplate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExternalVolumeTemplate) ProtoMessage() {} + +func (x *ExternalVolumeTemplate) ProtoReflect() protoreflect.Message { + mi := &file_ateapi_proto_msgTypes[24] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExternalVolumeTemplate.ProtoReflect.Descriptor instead. +func (*ExternalVolumeTemplate) Descriptor() ([]byte, []int) { + return file_ateapi_proto_rawDescGZIP(), []int{24} +} + +func (x *ExternalVolumeTemplate) GetCapacity() string { + if x != nil { + return x.Capacity + } + return "" +} + +func (x *ExternalVolumeTemplate) GetStorageClassName() string { + if x != nil { + return x.StorageClassName + } + return "" +} + +// VolumeMount mounts a named Volume into a container. +type VolumeMount struct { + state protoimpl.MessageState `protogen:"open.v1"` + // name must match the name of a Volume. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // mount_path within the container. Must be a clean absolute Unix path. + MountPath string `protobuf:"bytes,2,opt,name=mount_path,json=mountPath,proto3" json:"mount_path,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VolumeMount) Reset() { + *x = VolumeMount{} + mi := &file_ateapi_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VolumeMount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VolumeMount) ProtoMessage() {} + +func (x *VolumeMount) ProtoReflect() protoreflect.Message { + mi := &file_ateapi_proto_msgTypes[25] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VolumeMount.ProtoReflect.Descriptor instead. +func (*VolumeMount) Descriptor() ([]byte, []int) { + return file_ateapi_proto_rawDescGZIP(), []int{25} +} + +func (x *VolumeMount) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *VolumeMount) GetMountPath() string { + if x != nil { + return x.MountPath + } + return "" +} + +// SandboxAssets is the frozen description of the sandbox binaries an actor +// boots with: a class plus content-addressed files keyed first by +// architecture and then by asset name, mirroring the SandboxConfig +// CRD schema. +type SandboxAssets struct { + state protoimpl.MessageState `protogen:"open.v1"` + SandboxClass SandboxClass `protobuf:"varint,1,opt,name=sandbox_class,json=sandboxClass,proto3,enum=ateapi.SandboxClass" json:"sandbox_class,omitempty"` + // assets maps architecture (GOARCH, e.g. "amd64") to that arch's files. + Assets map[string]*ArchAssets `protobuf:"bytes,2,rep,name=assets,proto3" json:"assets,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SandboxAssets) Reset() { + *x = SandboxAssets{} + mi := &file_ateapi_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SandboxAssets) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SandboxAssets) ProtoMessage() {} + +func (x *SandboxAssets) ProtoReflect() protoreflect.Message { + mi := &file_ateapi_proto_msgTypes[26] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SandboxAssets.ProtoReflect.Descriptor instead. +func (*SandboxAssets) Descriptor() ([]byte, []int) { + return file_ateapi_proto_rawDescGZIP(), []int{26} +} + +func (x *SandboxAssets) GetSandboxClass() SandboxClass { + if x != nil { + return x.SandboxClass + } + return SandboxClass_SANDBOX_CLASS_UNSPECIFIED +} + +func (x *SandboxAssets) GetAssets() map[string]*ArchAssets { + if x != nil { + return x.Assets + } + return nil +} + +type ArchAssets struct { + state protoimpl.MessageState `protogen:"open.v1"` + // files maps asset name (e.g. "gvisor", "kata-kernel") to its file. + Files map[string]*AssetFile `protobuf:"bytes,1,rep,name=files,proto3" json:"files,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ArchAssets) Reset() { + *x = ArchAssets{} + mi := &file_ateapi_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ArchAssets) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ArchAssets) ProtoMessage() {} + +func (x *ArchAssets) ProtoReflect() protoreflect.Message { + mi := &file_ateapi_proto_msgTypes[27] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ArchAssets.ProtoReflect.Descriptor instead. +func (*ArchAssets) Descriptor() ([]byte, []int) { + return file_ateapi_proto_rawDescGZIP(), []int{27} +} + +func (x *ArchAssets) GetFiles() map[string]*AssetFile { + if x != nil { + return x.Files + } + return nil +} + +// AssetFile is one content-addressed file atelet fetches for a sandbox +// runtime. +type AssetFile struct { + state protoimpl.MessageState `protogen:"open.v1"` + // URL to download the asset from (e.g. a gs:// URL). + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` + // Lower-case hex SHA256 naming the cached file and verifying the download. + Sha256 string `protobuf:"bytes,2,opt,name=sha256,proto3" json:"sha256,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AssetFile) Reset() { + *x = AssetFile{} + mi := &file_ateapi_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AssetFile) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AssetFile) ProtoMessage() {} + +func (x *AssetFile) ProtoReflect() protoreflect.Message { + mi := &file_ateapi_proto_msgTypes[28] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AssetFile.ProtoReflect.Descriptor instead. +func (*AssetFile) Descriptor() ([]byte, []int) { + return file_ateapi_proto_rawDescGZIP(), []int{28} +} + +func (x *AssetFile) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +func (x *AssetFile) GetSha256() string { + if x != nil { + return x.Sha256 + } + return "" +} + +type CreateAtespaceRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The atespace to create. + Atespace *Atespace `protobuf:"bytes,1,opt,name=atespace,proto3" json:"atespace,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateAtespaceRequest) Reset() { + *x = CreateAtespaceRequest{} + mi := &file_ateapi_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateAtespaceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateAtespaceRequest) ProtoMessage() {} + +func (x *CreateAtespaceRequest) ProtoReflect() protoreflect.Message { + mi := &file_ateapi_proto_msgTypes[29] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateAtespaceRequest.ProtoReflect.Descriptor instead. +func (*CreateAtespaceRequest) Descriptor() ([]byte, []int) { + return file_ateapi_proto_rawDescGZIP(), []int{29} +} + +func (x *CreateAtespaceRequest) GetAtespace() *Atespace { + if x != nil { + return x.Atespace + } + return nil +} + +type GetAtespaceRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Atespace *ObjectRef `protobuf:"bytes,1,opt,name=atespace,proto3" json:"atespace,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetAtespaceRequest) Reset() { + *x = GetAtespaceRequest{} + mi := &file_ateapi_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetAtespaceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAtespaceRequest) ProtoMessage() {} + +func (x *GetAtespaceRequest) ProtoReflect() protoreflect.Message { + mi := &file_ateapi_proto_msgTypes[30] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAtespaceRequest.ProtoReflect.Descriptor instead. +func (*GetAtespaceRequest) Descriptor() ([]byte, []int) { + return file_ateapi_proto_rawDescGZIP(), []int{30} +} + +func (x *GetAtespaceRequest) GetAtespace() *ObjectRef { + if x != nil { + return x.Atespace + } + return nil +} + +type ListAtespacesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Requested page size; the server may return fewer, or occasionally + // slightly more. If unspecified, defaults to a server-chosen value; + // values above 1000 are coerced to 1000. + PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Pagination token from a previous ListAtespaces response. + // Omit or leave empty for the first request. + PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListAtespacesRequest) Reset() { + *x = ListAtespacesRequest{} + mi := &file_ateapi_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListAtespacesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAtespacesRequest) ProtoMessage() {} + +func (x *ListAtespacesRequest) ProtoReflect() protoreflect.Message { + mi := &file_ateapi_proto_msgTypes[31] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListAtespacesRequest.ProtoReflect.Descriptor instead. +func (*ListAtespacesRequest) Descriptor() ([]byte, []int) { + return file_ateapi_proto_rawDescGZIP(), []int{31} +} + +func (x *ListAtespacesRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListAtespacesRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +type ListAtespacesResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The page of atespaces. This list may be empty even if there are more results. + Atespaces []*Atespace `protobuf:"bytes,1,rep,name=atespaces,proto3" json:"atespaces,omitempty"` + // Pagination token for the next page. Empty if this is the last page. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListAtespacesResponse) Reset() { + *x = ListAtespacesResponse{} + mi := &file_ateapi_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListAtespacesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAtespacesResponse) ProtoMessage() {} + +func (x *ListAtespacesResponse) ProtoReflect() protoreflect.Message { + mi := &file_ateapi_proto_msgTypes[32] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListAtespacesResponse.ProtoReflect.Descriptor instead. +func (*ListAtespacesResponse) Descriptor() ([]byte, []int) { + return file_ateapi_proto_rawDescGZIP(), []int{32} +} + +func (x *ListAtespacesResponse) GetAtespaces() []*Atespace { + if x != nil { + return x.Atespaces + } + return nil +} + +func (x *ListAtespacesResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +type DeleteAtespaceRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Atespace *ObjectRef `protobuf:"bytes,1,opt,name=atespace,proto3" json:"atespace,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteAtespaceRequest) Reset() { + *x = DeleteAtespaceRequest{} + mi := &file_ateapi_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteAtespaceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteAtespaceRequest) ProtoMessage() {} + +func (x *DeleteAtespaceRequest) ProtoReflect() protoreflect.Message { + mi := &file_ateapi_proto_msgTypes[33] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteAtespaceRequest.ProtoReflect.Descriptor instead. +func (*DeleteAtespaceRequest) Descriptor() ([]byte, []int) { + return file_ateapi_proto_rawDescGZIP(), []int{33} +} + +func (x *DeleteAtespaceRequest) GetAtespace() *ObjectRef { + if x != nil { + return x.Atespace + } + return nil +} + +type CreateActorTemplateRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The actor template to create. Server-assigned metadata (uid, version, + // timestamps) is ignored. + ActorTemplate *ActorTemplate `protobuf:"bytes,1,opt,name=actor_template,json=actorTemplate,proto3" json:"actor_template,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateActorTemplateRequest) Reset() { + *x = CreateActorTemplateRequest{} + mi := &file_ateapi_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateActorTemplateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateActorTemplateRequest) ProtoMessage() {} + +func (x *CreateActorTemplateRequest) ProtoReflect() protoreflect.Message { + mi := &file_ateapi_proto_msgTypes[34] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateActorTemplateRequest.ProtoReflect.Descriptor instead. +func (*CreateActorTemplateRequest) Descriptor() ([]byte, []int) { + return file_ateapi_proto_rawDescGZIP(), []int{34} +} + +func (x *CreateActorTemplateRequest) GetActorTemplate() *ActorTemplate { + if x != nil { + return x.ActorTemplate + } + return nil +} + +type GetActorTemplateRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ActorTemplate *ObjectRef `protobuf:"bytes,1,opt,name=actor_template,json=actorTemplate,proto3" json:"actor_template,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetActorTemplateRequest) Reset() { + *x = GetActorTemplateRequest{} + mi := &file_ateapi_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetActorTemplateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetActorTemplateRequest) ProtoMessage() {} + +func (x *GetActorTemplateRequest) ProtoReflect() protoreflect.Message { + mi := &file_ateapi_proto_msgTypes[35] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetActorTemplateRequest.ProtoReflect.Descriptor instead. +func (*GetActorTemplateRequest) Descriptor() ([]byte, []int) { + return file_ateapi_proto_rawDescGZIP(), []int{35} +} + +func (x *GetActorTemplateRequest) GetActorTemplate() *ObjectRef { + if x != nil { + return x.ActorTemplate + } + return nil +} + +// Request to update mutable fields on an existing ActorTemplate. +type UpdateActorTemplateRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The actor template to update. + // actor_template.metadata.name identifies which resource to update. + // actor_template.metadata.version and actor_template.metadata.uid are + // optional preconditions and zero values skip the check. + ActorTemplate *ActorTemplate `protobuf:"bytes,1,opt,name=actor_template,json=actorTemplate,proto3" json:"actor_template,omitempty"` + // The set of fields to update. Required. + // + // Only the following fields are supported: + // - default_version_on_create + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateActorTemplateRequest) Reset() { + *x = UpdateActorTemplateRequest{} + mi := &file_ateapi_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateActorTemplateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateActorTemplateRequest) ProtoMessage() {} + +func (x *UpdateActorTemplateRequest) ProtoReflect() protoreflect.Message { + mi := &file_ateapi_proto_msgTypes[36] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateActorTemplateRequest.ProtoReflect.Descriptor instead. +func (*UpdateActorTemplateRequest) Descriptor() ([]byte, []int) { + return file_ateapi_proto_rawDescGZIP(), []int{36} +} + +func (x *UpdateActorTemplateRequest) GetActorTemplate() *ActorTemplate { + if x != nil { + return x.ActorTemplate + } + return nil +} + +func (x *UpdateActorTemplateRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +type ListActorTemplatesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The atespace to list actor templates from. Empty lists across all + // atespaces. + Atespace string `protobuf:"bytes,1,opt,name=atespace,proto3" json:"atespace,omitempty"` + // Requested page size; the server may return fewer, or occasionally + // slightly more. If unspecified, defaults to a server-chosen value; + // values above 1000 are coerced to 1000. + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Pagination token from a previous ListActorTemplates response. + // Omit or leave empty for the first request. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListActorTemplatesRequest) Reset() { + *x = ListActorTemplatesRequest{} + mi := &file_ateapi_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListActorTemplatesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListActorTemplatesRequest) ProtoMessage() {} + +func (x *ListActorTemplatesRequest) ProtoReflect() protoreflect.Message { + mi := &file_ateapi_proto_msgTypes[37] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListActorTemplatesRequest.ProtoReflect.Descriptor instead. +func (*ListActorTemplatesRequest) Descriptor() ([]byte, []int) { + return file_ateapi_proto_rawDescGZIP(), []int{37} +} + +func (x *ListActorTemplatesRequest) GetAtespace() string { + if x != nil { + return x.Atespace + } + return "" +} + +func (x *ListActorTemplatesRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListActorTemplatesRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +type ListActorTemplatesResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The page of actor templates. This list may be empty even if there are + // more results. + ActorTemplates []*ActorTemplate `protobuf:"bytes,1,rep,name=actor_templates,json=actorTemplates,proto3" json:"actor_templates,omitempty"` + // Pagination token for the next page. Empty if this is the last page. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListActorTemplatesResponse) Reset() { + *x = ListActorTemplatesResponse{} + mi := &file_ateapi_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListActorTemplatesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListActorTemplatesResponse) ProtoMessage() {} + +func (x *ListActorTemplatesResponse) ProtoReflect() protoreflect.Message { + mi := &file_ateapi_proto_msgTypes[38] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListActorTemplatesResponse.ProtoReflect.Descriptor instead. +func (*ListActorTemplatesResponse) Descriptor() ([]byte, []int) { + return file_ateapi_proto_rawDescGZIP(), []int{38} +} + +func (x *ListActorTemplatesResponse) GetActorTemplates() []*ActorTemplate { + if x != nil { + return x.ActorTemplates + } + return nil +} + +func (x *ListActorTemplatesResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +type DeleteActorTemplateRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ActorTemplate *ObjectRef `protobuf:"bytes,1,opt,name=actor_template,json=actorTemplate,proto3" json:"actor_template,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteActorTemplateRequest) Reset() { + *x = DeleteActorTemplateRequest{} + mi := &file_ateapi_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteActorTemplateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteActorTemplateRequest) ProtoMessage() {} -func (x *ActorSnapshotRef) ProtoReflect() protoreflect.Message { - mi := &file_ateapi_proto_msgTypes[10] +func (x *DeleteActorTemplateRequest) ProtoReflect() protoreflect.Message { + mi := &file_ateapi_proto_msgTypes[39] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1180,75 +3173,43 @@ func (x *ActorSnapshotRef) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ActorSnapshotRef.ProtoReflect.Descriptor instead. -func (*ActorSnapshotRef) Descriptor() ([]byte, []int) { - return file_ateapi_proto_rawDescGZIP(), []int{10} -} - -func (x *ActorSnapshotRef) GetReference() isActorSnapshotRef_Reference { - if x != nil { - return x.Reference - } - return nil -} - -func (x *ActorSnapshotRef) GetSnapshot() *ObjectRef { - if x != nil { - if x, ok := x.Reference.(*ActorSnapshotRef_Snapshot); ok { - return x.Snapshot - } - } - return nil +// Deprecated: Use DeleteActorTemplateRequest.ProtoReflect.Descriptor instead. +func (*DeleteActorTemplateRequest) Descriptor() ([]byte, []int) { + return file_ateapi_proto_rawDescGZIP(), []int{39} } -func (x *ActorSnapshotRef) GetTag() *ObjectRef { +func (x *DeleteActorTemplateRequest) GetActorTemplate() *ObjectRef { if x != nil { - if x, ok := x.Reference.(*ActorSnapshotRef_Tag); ok { - return x.Tag - } + return x.ActorTemplate } return nil } -type isActorSnapshotRef_Reference interface { - isActorSnapshotRef_Reference() -} - -type ActorSnapshotRef_Snapshot struct { - Snapshot *ObjectRef `protobuf:"bytes,1,opt,name=snapshot,proto3,oneof"` -} - -type ActorSnapshotRef_Tag struct { - Tag *ObjectRef `protobuf:"bytes,2,opt,name=tag,proto3,oneof"` -} - -func (*ActorSnapshotRef_Snapshot) isActorSnapshotRef_Reference() {} - -func (*ActorSnapshotRef_Tag) isActorSnapshotRef_Reference() {} - -type CreateAtespaceRequest struct { +type CreateActorTemplateVersionRequest struct { state protoimpl.MessageState `protogen:"open.v1"` - // The atespace to create. - Atespace *Atespace `protobuf:"bytes,1,opt,name=atespace,proto3" json:"atespace,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + // The actor template version to create. Server-assigned metadata (uid, + // version, timestamps) is ignored, as are the status fields: the server + // initializes new versions to STATE_INITIAL. + ActorTemplateVersion *ActorTemplateVersion `protobuf:"bytes,1,opt,name=actor_template_version,json=actorTemplateVersion,proto3" json:"actor_template_version,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *CreateAtespaceRequest) Reset() { - *x = CreateAtespaceRequest{} - mi := &file_ateapi_proto_msgTypes[11] +func (x *CreateActorTemplateVersionRequest) Reset() { + *x = CreateActorTemplateVersionRequest{} + mi := &file_ateapi_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *CreateAtespaceRequest) String() string { +func (x *CreateActorTemplateVersionRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CreateAtespaceRequest) ProtoMessage() {} +func (*CreateActorTemplateVersionRequest) ProtoMessage() {} -func (x *CreateAtespaceRequest) ProtoReflect() protoreflect.Message { - mi := &file_ateapi_proto_msgTypes[11] +func (x *CreateActorTemplateVersionRequest) ProtoReflect() protoreflect.Message { + mi := &file_ateapi_proto_msgTypes[40] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1259,40 +3220,40 @@ func (x *CreateAtespaceRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CreateAtespaceRequest.ProtoReflect.Descriptor instead. -func (*CreateAtespaceRequest) Descriptor() ([]byte, []int) { - return file_ateapi_proto_rawDescGZIP(), []int{11} +// Deprecated: Use CreateActorTemplateVersionRequest.ProtoReflect.Descriptor instead. +func (*CreateActorTemplateVersionRequest) Descriptor() ([]byte, []int) { + return file_ateapi_proto_rawDescGZIP(), []int{40} } -func (x *CreateAtespaceRequest) GetAtespace() *Atespace { +func (x *CreateActorTemplateVersionRequest) GetActorTemplateVersion() *ActorTemplateVersion { if x != nil { - return x.Atespace + return x.ActorTemplateVersion } return nil } -type GetAtespaceRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Atespace *ObjectRef `protobuf:"bytes,1,opt,name=atespace,proto3" json:"atespace,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache +type GetActorTemplateVersionRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ActorTemplateVersion *ObjectRef `protobuf:"bytes,1,opt,name=actor_template_version,json=actorTemplateVersion,proto3" json:"actor_template_version,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *GetAtespaceRequest) Reset() { - *x = GetAtespaceRequest{} - mi := &file_ateapi_proto_msgTypes[12] +func (x *GetActorTemplateVersionRequest) Reset() { + *x = GetActorTemplateVersionRequest{} + mi := &file_ateapi_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetAtespaceRequest) String() string { +func (x *GetActorTemplateVersionRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetAtespaceRequest) ProtoMessage() {} +func (*GetActorTemplateVersionRequest) ProtoMessage() {} -func (x *GetAtespaceRequest) ProtoReflect() protoreflect.Message { - mi := &file_ateapi_proto_msgTypes[12] +func (x *GetActorTemplateVersionRequest) ProtoReflect() protoreflect.Message { + mi := &file_ateapi_proto_msgTypes[41] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1303,46 +3264,52 @@ func (x *GetAtespaceRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetAtespaceRequest.ProtoReflect.Descriptor instead. -func (*GetAtespaceRequest) Descriptor() ([]byte, []int) { - return file_ateapi_proto_rawDescGZIP(), []int{12} +// Deprecated: Use GetActorTemplateVersionRequest.ProtoReflect.Descriptor instead. +func (*GetActorTemplateVersionRequest) Descriptor() ([]byte, []int) { + return file_ateapi_proto_rawDescGZIP(), []int{41} } -func (x *GetAtespaceRequest) GetAtespace() *ObjectRef { +func (x *GetActorTemplateVersionRequest) GetActorTemplateVersion() *ObjectRef { if x != nil { - return x.Atespace + return x.ActorTemplateVersion } return nil } -type ListAtespacesRequest struct { +type ListActorTemplateVersionsRequest struct { state protoimpl.MessageState `protogen:"open.v1"` + // The parent ActorTemplate whose versions to list. An unset ref lists + // versions across all templates. + ActorTemplate *ObjectRef `protobuf:"bytes,1,opt,name=actor_template,json=actorTemplate,proto3" json:"actor_template,omitempty"` + // The atespace to list actor templates from. Empty lists across all + // atespaces. + Atespace string `protobuf:"bytes,2,opt,name=atespace,proto3" json:"atespace,omitempty"` // Requested page size; the server may return fewer, or occasionally // slightly more. If unspecified, defaults to a server-chosen value; // values above 1000 are coerced to 1000. - PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` - // Pagination token from a previous ListAtespaces response. + PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Pagination token from a previous ListActorTemplateVersions response. // Omit or leave empty for the first request. - PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *ListAtespacesRequest) Reset() { - *x = ListAtespacesRequest{} - mi := &file_ateapi_proto_msgTypes[13] +func (x *ListActorTemplateVersionsRequest) Reset() { + *x = ListActorTemplateVersionsRequest{} + mi := &file_ateapi_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *ListAtespacesRequest) String() string { +func (x *ListActorTemplateVersionsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ListAtespacesRequest) ProtoMessage() {} +func (*ListActorTemplateVersionsRequest) ProtoMessage() {} -func (x *ListAtespacesRequest) ProtoReflect() protoreflect.Message { - mi := &file_ateapi_proto_msgTypes[13] +func (x *ListActorTemplateVersionsRequest) ProtoReflect() protoreflect.Message { + mi := &file_ateapi_proto_msgTypes[42] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1353,50 +3320,65 @@ func (x *ListAtespacesRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ListAtespacesRequest.ProtoReflect.Descriptor instead. -func (*ListAtespacesRequest) Descriptor() ([]byte, []int) { - return file_ateapi_proto_rawDescGZIP(), []int{13} +// Deprecated: Use ListActorTemplateVersionsRequest.ProtoReflect.Descriptor instead. +func (*ListActorTemplateVersionsRequest) Descriptor() ([]byte, []int) { + return file_ateapi_proto_rawDescGZIP(), []int{42} } -func (x *ListAtespacesRequest) GetPageSize() int32 { +func (x *ListActorTemplateVersionsRequest) GetActorTemplate() *ObjectRef { + if x != nil { + return x.ActorTemplate + } + return nil +} + +func (x *ListActorTemplateVersionsRequest) GetAtespace() string { + if x != nil { + return x.Atespace + } + return "" +} + +func (x *ListActorTemplateVersionsRequest) GetPageSize() int32 { if x != nil { return x.PageSize } return 0 } -func (x *ListAtespacesRequest) GetPageToken() string { +func (x *ListActorTemplateVersionsRequest) GetPageToken() string { if x != nil { return x.PageToken } return "" } -type ListAtespacesResponse struct { +type ListActorTemplateVersionsResponse struct { state protoimpl.MessageState `protogen:"open.v1"` - // The page of atespaces. This list may be empty even if there are more results. - Atespaces []*Atespace `protobuf:"bytes,1,rep,name=atespaces,proto3" json:"atespaces,omitempty"` + // The page of actor template versions. This list may be empty even if + // there are more results. + ActorTemplateVersions []*ActorTemplateVersion `protobuf:"bytes,1,rep,name=actor_template_versions,json=actorTemplateVersions,proto3" json:"actor_template_versions,omitempty"` // Pagination token for the next page. Empty if this is the last page. NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *ListAtespacesResponse) Reset() { - *x = ListAtespacesResponse{} - mi := &file_ateapi_proto_msgTypes[14] +func (x *ListActorTemplateVersionsResponse) Reset() { + *x = ListActorTemplateVersionsResponse{} + mi := &file_ateapi_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *ListAtespacesResponse) String() string { +func (x *ListActorTemplateVersionsResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ListAtespacesResponse) ProtoMessage() {} +func (*ListActorTemplateVersionsResponse) ProtoMessage() {} -func (x *ListAtespacesResponse) ProtoReflect() protoreflect.Message { - mi := &file_ateapi_proto_msgTypes[14] +func (x *ListActorTemplateVersionsResponse) ProtoReflect() protoreflect.Message { + mi := &file_ateapi_proto_msgTypes[43] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1407,47 +3389,47 @@ func (x *ListAtespacesResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ListAtespacesResponse.ProtoReflect.Descriptor instead. -func (*ListAtespacesResponse) Descriptor() ([]byte, []int) { - return file_ateapi_proto_rawDescGZIP(), []int{14} +// Deprecated: Use ListActorTemplateVersionsResponse.ProtoReflect.Descriptor instead. +func (*ListActorTemplateVersionsResponse) Descriptor() ([]byte, []int) { + return file_ateapi_proto_rawDescGZIP(), []int{43} } -func (x *ListAtespacesResponse) GetAtespaces() []*Atespace { +func (x *ListActorTemplateVersionsResponse) GetActorTemplateVersions() []*ActorTemplateVersion { if x != nil { - return x.Atespaces + return x.ActorTemplateVersions } return nil } -func (x *ListAtespacesResponse) GetNextPageToken() string { +func (x *ListActorTemplateVersionsResponse) GetNextPageToken() string { if x != nil { return x.NextPageToken } return "" } -type DeleteAtespaceRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Atespace *ObjectRef `protobuf:"bytes,1,opt,name=atespace,proto3" json:"atespace,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache +type DeleteActorTemplateVersionRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ActorTemplateVersion *ObjectRef `protobuf:"bytes,1,opt,name=actor_template_version,json=actorTemplateVersion,proto3" json:"actor_template_version,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *DeleteAtespaceRequest) Reset() { - *x = DeleteAtespaceRequest{} - mi := &file_ateapi_proto_msgTypes[15] +func (x *DeleteActorTemplateVersionRequest) Reset() { + *x = DeleteActorTemplateVersionRequest{} + mi := &file_ateapi_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *DeleteAtespaceRequest) String() string { +func (x *DeleteActorTemplateVersionRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*DeleteAtespaceRequest) ProtoMessage() {} +func (*DeleteActorTemplateVersionRequest) ProtoMessage() {} -func (x *DeleteAtespaceRequest) ProtoReflect() protoreflect.Message { - mi := &file_ateapi_proto_msgTypes[15] +func (x *DeleteActorTemplateVersionRequest) ProtoReflect() protoreflect.Message { + mi := &file_ateapi_proto_msgTypes[44] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1458,14 +3440,14 @@ func (x *DeleteAtespaceRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use DeleteAtespaceRequest.ProtoReflect.Descriptor instead. -func (*DeleteAtespaceRequest) Descriptor() ([]byte, []int) { - return file_ateapi_proto_rawDescGZIP(), []int{15} +// Deprecated: Use DeleteActorTemplateVersionRequest.ProtoReflect.Descriptor instead. +func (*DeleteActorTemplateVersionRequest) Descriptor() ([]byte, []int) { + return file_ateapi_proto_rawDescGZIP(), []int{44} } -func (x *DeleteAtespaceRequest) GetAtespace() *ObjectRef { +func (x *DeleteActorTemplateVersionRequest) GetActorTemplateVersion() *ObjectRef { if x != nil { - return x.Atespace + return x.ActorTemplateVersion } return nil } @@ -1479,7 +3461,7 @@ type GetActorRequest struct { func (x *GetActorRequest) Reset() { *x = GetActorRequest{} - mi := &file_ateapi_proto_msgTypes[16] + mi := &file_ateapi_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1491,7 +3473,7 @@ func (x *GetActorRequest) String() string { func (*GetActorRequest) ProtoMessage() {} func (x *GetActorRequest) ProtoReflect() protoreflect.Message { - mi := &file_ateapi_proto_msgTypes[16] + mi := &file_ateapi_proto_msgTypes[45] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1504,7 +3486,7 @@ func (x *GetActorRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetActorRequest.ProtoReflect.Descriptor instead. func (*GetActorRequest) Descriptor() ([]byte, []int) { - return file_ateapi_proto_rawDescGZIP(), []int{16} + return file_ateapi_proto_rawDescGZIP(), []int{45} } func (x *GetActorRequest) GetActor() *ObjectRef { @@ -1527,7 +3509,7 @@ type CreateActorRequest struct { func (x *CreateActorRequest) Reset() { *x = CreateActorRequest{} - mi := &file_ateapi_proto_msgTypes[17] + mi := &file_ateapi_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1539,7 +3521,7 @@ func (x *CreateActorRequest) String() string { func (*CreateActorRequest) ProtoMessage() {} func (x *CreateActorRequest) ProtoReflect() protoreflect.Message { - mi := &file_ateapi_proto_msgTypes[17] + mi := &file_ateapi_proto_msgTypes[46] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1552,7 +3534,7 @@ func (x *CreateActorRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateActorRequest.ProtoReflect.Descriptor instead. func (*CreateActorRequest) Descriptor() ([]byte, []int) { - return file_ateapi_proto_rawDescGZIP(), []int{17} + return file_ateapi_proto_rawDescGZIP(), []int{46} } func (x *CreateActorRequest) GetActor() *Actor { @@ -1591,7 +3573,7 @@ type UpdateActorRequest struct { func (x *UpdateActorRequest) Reset() { *x = UpdateActorRequest{} - mi := &file_ateapi_proto_msgTypes[18] + mi := &file_ateapi_proto_msgTypes[47] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1603,7 +3585,7 @@ func (x *UpdateActorRequest) String() string { func (*UpdateActorRequest) ProtoMessage() {} func (x *UpdateActorRequest) ProtoReflect() protoreflect.Message { - mi := &file_ateapi_proto_msgTypes[18] + mi := &file_ateapi_proto_msgTypes[47] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1616,7 +3598,7 @@ func (x *UpdateActorRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateActorRequest.ProtoReflect.Descriptor instead. func (*UpdateActorRequest) Descriptor() ([]byte, []int) { - return file_ateapi_proto_rawDescGZIP(), []int{18} + return file_ateapi_proto_rawDescGZIP(), []int{47} } func (x *UpdateActorRequest) GetActor() *Actor { @@ -1642,7 +3624,7 @@ type SuspendActorRequest struct { func (x *SuspendActorRequest) Reset() { *x = SuspendActorRequest{} - mi := &file_ateapi_proto_msgTypes[19] + mi := &file_ateapi_proto_msgTypes[48] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1654,7 +3636,7 @@ func (x *SuspendActorRequest) String() string { func (*SuspendActorRequest) ProtoMessage() {} func (x *SuspendActorRequest) ProtoReflect() protoreflect.Message { - mi := &file_ateapi_proto_msgTypes[19] + mi := &file_ateapi_proto_msgTypes[48] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1667,7 +3649,7 @@ func (x *SuspendActorRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SuspendActorRequest.ProtoReflect.Descriptor instead. func (*SuspendActorRequest) Descriptor() ([]byte, []int) { - return file_ateapi_proto_rawDescGZIP(), []int{19} + return file_ateapi_proto_rawDescGZIP(), []int{48} } func (x *SuspendActorRequest) GetActor() *ObjectRef { @@ -1686,7 +3668,7 @@ type SuspendActorResponse struct { func (x *SuspendActorResponse) Reset() { *x = SuspendActorResponse{} - mi := &file_ateapi_proto_msgTypes[20] + mi := &file_ateapi_proto_msgTypes[49] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1698,7 +3680,7 @@ func (x *SuspendActorResponse) String() string { func (*SuspendActorResponse) ProtoMessage() {} func (x *SuspendActorResponse) ProtoReflect() protoreflect.Message { - mi := &file_ateapi_proto_msgTypes[20] + mi := &file_ateapi_proto_msgTypes[49] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1711,7 +3693,7 @@ func (x *SuspendActorResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SuspendActorResponse.ProtoReflect.Descriptor instead. func (*SuspendActorResponse) Descriptor() ([]byte, []int) { - return file_ateapi_proto_rawDescGZIP(), []int{20} + return file_ateapi_proto_rawDescGZIP(), []int{49} } func (x *SuspendActorResponse) GetActor() *Actor { @@ -1730,7 +3712,7 @@ type PauseActorRequest struct { func (x *PauseActorRequest) Reset() { *x = PauseActorRequest{} - mi := &file_ateapi_proto_msgTypes[21] + mi := &file_ateapi_proto_msgTypes[50] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1742,7 +3724,7 @@ func (x *PauseActorRequest) String() string { func (*PauseActorRequest) ProtoMessage() {} func (x *PauseActorRequest) ProtoReflect() protoreflect.Message { - mi := &file_ateapi_proto_msgTypes[21] + mi := &file_ateapi_proto_msgTypes[50] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1755,7 +3737,7 @@ func (x *PauseActorRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use PauseActorRequest.ProtoReflect.Descriptor instead. func (*PauseActorRequest) Descriptor() ([]byte, []int) { - return file_ateapi_proto_rawDescGZIP(), []int{21} + return file_ateapi_proto_rawDescGZIP(), []int{50} } func (x *PauseActorRequest) GetActor() *ObjectRef { @@ -1774,7 +3756,7 @@ type PauseActorResponse struct { func (x *PauseActorResponse) Reset() { *x = PauseActorResponse{} - mi := &file_ateapi_proto_msgTypes[22] + mi := &file_ateapi_proto_msgTypes[51] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1786,7 +3768,7 @@ func (x *PauseActorResponse) String() string { func (*PauseActorResponse) ProtoMessage() {} func (x *PauseActorResponse) ProtoReflect() protoreflect.Message { - mi := &file_ateapi_proto_msgTypes[22] + mi := &file_ateapi_proto_msgTypes[51] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1799,7 +3781,7 @@ func (x *PauseActorResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use PauseActorResponse.ProtoReflect.Descriptor instead. func (*PauseActorResponse) Descriptor() ([]byte, []int) { - return file_ateapi_proto_rawDescGZIP(), []int{22} + return file_ateapi_proto_rawDescGZIP(), []int{51} } func (x *PauseActorResponse) GetActor() *Actor { @@ -1820,7 +3802,7 @@ type ResumeActorRequest struct { func (x *ResumeActorRequest) Reset() { *x = ResumeActorRequest{} - mi := &file_ateapi_proto_msgTypes[23] + mi := &file_ateapi_proto_msgTypes[52] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1832,7 +3814,7 @@ func (x *ResumeActorRequest) String() string { func (*ResumeActorRequest) ProtoMessage() {} func (x *ResumeActorRequest) ProtoReflect() protoreflect.Message { - mi := &file_ateapi_proto_msgTypes[23] + mi := &file_ateapi_proto_msgTypes[52] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1845,7 +3827,7 @@ func (x *ResumeActorRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ResumeActorRequest.ProtoReflect.Descriptor instead. func (*ResumeActorRequest) Descriptor() ([]byte, []int) { - return file_ateapi_proto_rawDescGZIP(), []int{23} + return file_ateapi_proto_rawDescGZIP(), []int{52} } func (x *ResumeActorRequest) GetActor() *ObjectRef { @@ -1874,7 +3856,7 @@ type ResumeActorResponse struct { func (x *ResumeActorResponse) Reset() { *x = ResumeActorResponse{} - mi := &file_ateapi_proto_msgTypes[24] + mi := &file_ateapi_proto_msgTypes[53] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1886,7 +3868,7 @@ func (x *ResumeActorResponse) String() string { func (*ResumeActorResponse) ProtoMessage() {} func (x *ResumeActorResponse) ProtoReflect() protoreflect.Message { - mi := &file_ateapi_proto_msgTypes[24] + mi := &file_ateapi_proto_msgTypes[53] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1899,7 +3881,7 @@ func (x *ResumeActorResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ResumeActorResponse.ProtoReflect.Descriptor instead. func (*ResumeActorResponse) Descriptor() ([]byte, []int) { - return file_ateapi_proto_rawDescGZIP(), []int{24} + return file_ateapi_proto_rawDescGZIP(), []int{53} } func (x *ResumeActorResponse) GetActor() *Actor { @@ -1925,7 +3907,7 @@ type DeleteActorRequest struct { func (x *DeleteActorRequest) Reset() { *x = DeleteActorRequest{} - mi := &file_ateapi_proto_msgTypes[25] + mi := &file_ateapi_proto_msgTypes[54] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1937,7 +3919,7 @@ func (x *DeleteActorRequest) String() string { func (*DeleteActorRequest) ProtoMessage() {} func (x *DeleteActorRequest) ProtoReflect() protoreflect.Message { - mi := &file_ateapi_proto_msgTypes[25] + mi := &file_ateapi_proto_msgTypes[54] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1950,7 +3932,7 @@ func (x *DeleteActorRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteActorRequest.ProtoReflect.Descriptor instead. func (*DeleteActorRequest) Descriptor() ([]byte, []int) { - return file_ateapi_proto_rawDescGZIP(), []int{25} + return file_ateapi_proto_rawDescGZIP(), []int{54} } func (x *DeleteActorRequest) GetActor() *ObjectRef { @@ -1969,7 +3951,7 @@ type GetActorSnapshotRequest struct { func (x *GetActorSnapshotRequest) Reset() { *x = GetActorSnapshotRequest{} - mi := &file_ateapi_proto_msgTypes[26] + mi := &file_ateapi_proto_msgTypes[55] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1981,7 +3963,7 @@ func (x *GetActorSnapshotRequest) String() string { func (*GetActorSnapshotRequest) ProtoMessage() {} func (x *GetActorSnapshotRequest) ProtoReflect() protoreflect.Message { - mi := &file_ateapi_proto_msgTypes[26] + mi := &file_ateapi_proto_msgTypes[55] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1994,7 +3976,7 @@ func (x *GetActorSnapshotRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetActorSnapshotRequest.ProtoReflect.Descriptor instead. func (*GetActorSnapshotRequest) Descriptor() ([]byte, []int) { - return file_ateapi_proto_rawDescGZIP(), []int{26} + return file_ateapi_proto_rawDescGZIP(), []int{55} } func (x *GetActorSnapshotRequest) GetSnapshot() *ActorSnapshotRef { @@ -2015,7 +3997,7 @@ type ListActorSnapshotsRequest struct { func (x *ListActorSnapshotsRequest) Reset() { *x = ListActorSnapshotsRequest{} - mi := &file_ateapi_proto_msgTypes[27] + mi := &file_ateapi_proto_msgTypes[56] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2027,7 +4009,7 @@ func (x *ListActorSnapshotsRequest) String() string { func (*ListActorSnapshotsRequest) ProtoMessage() {} func (x *ListActorSnapshotsRequest) ProtoReflect() protoreflect.Message { - mi := &file_ateapi_proto_msgTypes[27] + mi := &file_ateapi_proto_msgTypes[56] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2040,7 +4022,7 @@ func (x *ListActorSnapshotsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListActorSnapshotsRequest.ProtoReflect.Descriptor instead. func (*ListActorSnapshotsRequest) Descriptor() ([]byte, []int) { - return file_ateapi_proto_rawDescGZIP(), []int{27} + return file_ateapi_proto_rawDescGZIP(), []int{56} } func (x *ListActorSnapshotsRequest) GetAtespace() string { @@ -2074,7 +4056,7 @@ type ListActorSnapshotsResponse struct { func (x *ListActorSnapshotsResponse) Reset() { *x = ListActorSnapshotsResponse{} - mi := &file_ateapi_proto_msgTypes[28] + mi := &file_ateapi_proto_msgTypes[57] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2086,7 +4068,7 @@ func (x *ListActorSnapshotsResponse) String() string { func (*ListActorSnapshotsResponse) ProtoMessage() {} func (x *ListActorSnapshotsResponse) ProtoReflect() protoreflect.Message { - mi := &file_ateapi_proto_msgTypes[28] + mi := &file_ateapi_proto_msgTypes[57] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2099,7 +4081,7 @@ func (x *ListActorSnapshotsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListActorSnapshotsResponse.ProtoReflect.Descriptor instead. func (*ListActorSnapshotsResponse) Descriptor() ([]byte, []int) { - return file_ateapi_proto_rawDescGZIP(), []int{28} + return file_ateapi_proto_rawDescGZIP(), []int{57} } func (x *ListActorSnapshotsResponse) GetSnapshots() []*ActorSnapshot { @@ -2126,7 +4108,7 @@ type TagActorSnapshotRequest struct { func (x *TagActorSnapshotRequest) Reset() { *x = TagActorSnapshotRequest{} - mi := &file_ateapi_proto_msgTypes[29] + mi := &file_ateapi_proto_msgTypes[58] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2138,7 +4120,7 @@ func (x *TagActorSnapshotRequest) String() string { func (*TagActorSnapshotRequest) ProtoMessage() {} func (x *TagActorSnapshotRequest) ProtoReflect() protoreflect.Message { - mi := &file_ateapi_proto_msgTypes[29] + mi := &file_ateapi_proto_msgTypes[58] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2151,7 +4133,7 @@ func (x *TagActorSnapshotRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use TagActorSnapshotRequest.ProtoReflect.Descriptor instead. func (*TagActorSnapshotRequest) Descriptor() ([]byte, []int) { - return file_ateapi_proto_rawDescGZIP(), []int{29} + return file_ateapi_proto_rawDescGZIP(), []int{58} } func (x *TagActorSnapshotRequest) GetSnapshot() *ActorSnapshotRef { @@ -2189,7 +4171,7 @@ type UpdateActorSnapshotTagRequest struct { func (x *UpdateActorSnapshotTagRequest) Reset() { *x = UpdateActorSnapshotTagRequest{} - mi := &file_ateapi_proto_msgTypes[30] + mi := &file_ateapi_proto_msgTypes[59] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2201,7 +4183,7 @@ func (x *UpdateActorSnapshotTagRequest) String() string { func (*UpdateActorSnapshotTagRequest) ProtoMessage() {} func (x *UpdateActorSnapshotTagRequest) ProtoReflect() protoreflect.Message { - mi := &file_ateapi_proto_msgTypes[30] + mi := &file_ateapi_proto_msgTypes[59] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2214,7 +4196,7 @@ func (x *UpdateActorSnapshotTagRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateActorSnapshotTagRequest.ProtoReflect.Descriptor instead. func (*UpdateActorSnapshotTagRequest) Descriptor() ([]byte, []int) { - return file_ateapi_proto_rawDescGZIP(), []int{30} + return file_ateapi_proto_rawDescGZIP(), []int{59} } func (x *UpdateActorSnapshotTagRequest) GetTag() *ActorSnapshotTag { @@ -2240,7 +4222,7 @@ type DeleteActorSnapshotTagRequest struct { func (x *DeleteActorSnapshotTagRequest) Reset() { *x = DeleteActorSnapshotTagRequest{} - mi := &file_ateapi_proto_msgTypes[31] + mi := &file_ateapi_proto_msgTypes[60] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2252,7 +4234,7 @@ func (x *DeleteActorSnapshotTagRequest) String() string { func (*DeleteActorSnapshotTagRequest) ProtoMessage() {} func (x *DeleteActorSnapshotTagRequest) ProtoReflect() protoreflect.Message { - mi := &file_ateapi_proto_msgTypes[31] + mi := &file_ateapi_proto_msgTypes[60] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2265,7 +4247,7 @@ func (x *DeleteActorSnapshotTagRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteActorSnapshotTagRequest.ProtoReflect.Descriptor instead. func (*DeleteActorSnapshotTagRequest) Descriptor() ([]byte, []int) { - return file_ateapi_proto_rawDescGZIP(), []int{31} + return file_ateapi_proto_rawDescGZIP(), []int{60} } func (x *DeleteActorSnapshotTagRequest) GetTag() *ObjectRef { @@ -2290,7 +4272,7 @@ type ListWorkersRequest struct { func (x *ListWorkersRequest) Reset() { *x = ListWorkersRequest{} - mi := &file_ateapi_proto_msgTypes[32] + mi := &file_ateapi_proto_msgTypes[61] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2302,7 +4284,7 @@ func (x *ListWorkersRequest) String() string { func (*ListWorkersRequest) ProtoMessage() {} func (x *ListWorkersRequest) ProtoReflect() protoreflect.Message { - mi := &file_ateapi_proto_msgTypes[32] + mi := &file_ateapi_proto_msgTypes[61] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2315,7 +4297,7 @@ func (x *ListWorkersRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListWorkersRequest.ProtoReflect.Descriptor instead. func (*ListWorkersRequest) Descriptor() ([]byte, []int) { - return file_ateapi_proto_rawDescGZIP(), []int{32} + return file_ateapi_proto_rawDescGZIP(), []int{61} } func (x *ListWorkersRequest) GetPageSize() int32 { @@ -2344,7 +4326,7 @@ type ListWorkersResponse struct { func (x *ListWorkersResponse) Reset() { *x = ListWorkersResponse{} - mi := &file_ateapi_proto_msgTypes[33] + mi := &file_ateapi_proto_msgTypes[62] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2356,7 +4338,7 @@ func (x *ListWorkersResponse) String() string { func (*ListWorkersResponse) ProtoMessage() {} func (x *ListWorkersResponse) ProtoReflect() protoreflect.Message { - mi := &file_ateapi_proto_msgTypes[33] + mi := &file_ateapi_proto_msgTypes[62] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2369,7 +4351,7 @@ func (x *ListWorkersResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListWorkersResponse.ProtoReflect.Descriptor instead. func (*ListWorkersResponse) Descriptor() ([]byte, []int) { - return file_ateapi_proto_rawDescGZIP(), []int{33} + return file_ateapi_proto_rawDescGZIP(), []int{62} } func (x *ListWorkersResponse) GetWorkers() []*Worker { @@ -2405,7 +4387,7 @@ type ListActorsRequest struct { func (x *ListActorsRequest) Reset() { *x = ListActorsRequest{} - mi := &file_ateapi_proto_msgTypes[34] + mi := &file_ateapi_proto_msgTypes[63] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2417,7 +4399,7 @@ func (x *ListActorsRequest) String() string { func (*ListActorsRequest) ProtoMessage() {} func (x *ListActorsRequest) ProtoReflect() protoreflect.Message { - mi := &file_ateapi_proto_msgTypes[34] + mi := &file_ateapi_proto_msgTypes[63] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2430,7 +4412,7 @@ func (x *ListActorsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListActorsRequest.ProtoReflect.Descriptor instead. func (*ListActorsRequest) Descriptor() ([]byte, []int) { - return file_ateapi_proto_rawDescGZIP(), []int{34} + return file_ateapi_proto_rawDescGZIP(), []int{63} } func (x *ListActorsRequest) GetAtespace() string { @@ -2466,7 +4448,7 @@ type ListActorsResponse struct { func (x *ListActorsResponse) Reset() { *x = ListActorsResponse{} - mi := &file_ateapi_proto_msgTypes[35] + mi := &file_ateapi_proto_msgTypes[64] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2478,7 +4460,7 @@ func (x *ListActorsResponse) String() string { func (*ListActorsResponse) ProtoMessage() {} func (x *ListActorsResponse) ProtoReflect() protoreflect.Message { - mi := &file_ateapi_proto_msgTypes[35] + mi := &file_ateapi_proto_msgTypes[64] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2491,7 +4473,7 @@ func (x *ListActorsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListActorsResponse.ProtoReflect.Descriptor instead. func (*ListActorsResponse) Descriptor() ([]byte, []int) { - return file_ateapi_proto_rawDescGZIP(), []int{35} + return file_ateapi_proto_rawDescGZIP(), []int{64} } func (x *ListActorsResponse) GetActors() []*Actor { @@ -2527,7 +4509,7 @@ type Worker struct { func (x *Worker) Reset() { *x = Worker{} - mi := &file_ateapi_proto_msgTypes[36] + mi := &file_ateapi_proto_msgTypes[65] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2539,7 +4521,7 @@ func (x *Worker) String() string { func (*Worker) ProtoMessage() {} func (x *Worker) ProtoReflect() protoreflect.Message { - mi := &file_ateapi_proto_msgTypes[36] + mi := &file_ateapi_proto_msgTypes[65] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2552,7 +4534,7 @@ func (x *Worker) ProtoReflect() protoreflect.Message { // Deprecated: Use Worker.ProtoReflect.Descriptor instead. func (*Worker) Descriptor() ([]byte, []int) { - return file_ateapi_proto_rawDescGZIP(), []int{36} + return file_ateapi_proto_rawDescGZIP(), []int{65} } func (x *Worker) GetWorkerNamespace() string { @@ -2643,7 +4625,7 @@ type Assignment struct { func (x *Assignment) Reset() { *x = Assignment{} - mi := &file_ateapi_proto_msgTypes[37] + mi := &file_ateapi_proto_msgTypes[66] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2655,7 +4637,7 @@ func (x *Assignment) String() string { func (*Assignment) ProtoMessage() {} func (x *Assignment) ProtoReflect() protoreflect.Message { - mi := &file_ateapi_proto_msgTypes[37] + mi := &file_ateapi_proto_msgTypes[66] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2668,7 +4650,7 @@ func (x *Assignment) ProtoReflect() protoreflect.Message { // Deprecated: Use Assignment.ProtoReflect.Descriptor instead. func (*Assignment) Descriptor() ([]byte, []int) { - return file_ateapi_proto_rawDescGZIP(), []int{37} + return file_ateapi_proto_rawDescGZIP(), []int{66} } func (x *Assignment) GetActorTemplate() *KubeNamespacedObjectRef { @@ -2702,7 +4684,7 @@ type KubeNamespacedObjectRef struct { func (x *KubeNamespacedObjectRef) Reset() { *x = KubeNamespacedObjectRef{} - mi := &file_ateapi_proto_msgTypes[38] + mi := &file_ateapi_proto_msgTypes[67] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2714,7 +4696,7 @@ func (x *KubeNamespacedObjectRef) String() string { func (*KubeNamespacedObjectRef) ProtoMessage() {} func (x *KubeNamespacedObjectRef) ProtoReflect() protoreflect.Message { - mi := &file_ateapi_proto_msgTypes[38] + mi := &file_ateapi_proto_msgTypes[67] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2727,7 +4709,7 @@ func (x *KubeNamespacedObjectRef) ProtoReflect() protoreflect.Message { // Deprecated: Use KubeNamespacedObjectRef.ProtoReflect.Descriptor instead. func (*KubeNamespacedObjectRef) Descriptor() ([]byte, []int) { - return file_ateapi_proto_rawDescGZIP(), []int{38} + return file_ateapi_proto_rawDescGZIP(), []int{67} } func (x *KubeNamespacedObjectRef) GetNamespace() string { @@ -2752,7 +4734,7 @@ type DebugClearRequest struct { func (x *DebugClearRequest) Reset() { *x = DebugClearRequest{} - mi := &file_ateapi_proto_msgTypes[39] + mi := &file_ateapi_proto_msgTypes[68] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2764,7 +4746,7 @@ func (x *DebugClearRequest) String() string { func (*DebugClearRequest) ProtoMessage() {} func (x *DebugClearRequest) ProtoReflect() protoreflect.Message { - mi := &file_ateapi_proto_msgTypes[39] + mi := &file_ateapi_proto_msgTypes[68] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2777,7 +4759,7 @@ func (x *DebugClearRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DebugClearRequest.ProtoReflect.Descriptor instead. func (*DebugClearRequest) Descriptor() ([]byte, []int) { - return file_ateapi_proto_rawDescGZIP(), []int{39} + return file_ateapi_proto_rawDescGZIP(), []int{68} } type DebugClearResponse struct { @@ -2788,7 +4770,7 @@ type DebugClearResponse struct { func (x *DebugClearResponse) Reset() { *x = DebugClearResponse{} - mi := &file_ateapi_proto_msgTypes[40] + mi := &file_ateapi_proto_msgTypes[69] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2800,7 +4782,7 @@ func (x *DebugClearResponse) String() string { func (*DebugClearResponse) ProtoMessage() {} func (x *DebugClearResponse) ProtoReflect() protoreflect.Message { - mi := &file_ateapi_proto_msgTypes[40] + mi := &file_ateapi_proto_msgTypes[69] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2813,7 +4795,7 @@ func (x *DebugClearResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DebugClearResponse.ProtoReflect.Descriptor instead. func (*DebugClearResponse) Descriptor() ([]byte, []int) { - return file_ateapi_proto_rawDescGZIP(), []int{40} + return file_ateapi_proto_rawDescGZIP(), []int{69} } type MintJWTRequest struct { @@ -2828,7 +4810,7 @@ type MintJWTRequest struct { func (x *MintJWTRequest) Reset() { *x = MintJWTRequest{} - mi := &file_ateapi_proto_msgTypes[41] + mi := &file_ateapi_proto_msgTypes[70] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2840,7 +4822,7 @@ func (x *MintJWTRequest) String() string { func (*MintJWTRequest) ProtoMessage() {} func (x *MintJWTRequest) ProtoReflect() protoreflect.Message { - mi := &file_ateapi_proto_msgTypes[41] + mi := &file_ateapi_proto_msgTypes[70] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2853,7 +4835,7 @@ func (x *MintJWTRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use MintJWTRequest.ProtoReflect.Descriptor instead. func (*MintJWTRequest) Descriptor() ([]byte, []int) { - return file_ateapi_proto_rawDescGZIP(), []int{41} + return file_ateapi_proto_rawDescGZIP(), []int{70} } func (x *MintJWTRequest) GetAudience() []string { @@ -2914,7 +4896,7 @@ type MintJWTResponse struct { func (x *MintJWTResponse) Reset() { *x = MintJWTResponse{} - mi := &file_ateapi_proto_msgTypes[42] + mi := &file_ateapi_proto_msgTypes[71] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2926,7 +4908,7 @@ func (x *MintJWTResponse) String() string { func (*MintJWTResponse) ProtoMessage() {} func (x *MintJWTResponse) ProtoReflect() protoreflect.Message { - mi := &file_ateapi_proto_msgTypes[42] + mi := &file_ateapi_proto_msgTypes[71] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2939,7 +4921,7 @@ func (x *MintJWTResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use MintJWTResponse.ProtoReflect.Descriptor instead. func (*MintJWTResponse) Descriptor() ([]byte, []int) { - return file_ateapi_proto_rawDescGZIP(), []int{42} + return file_ateapi_proto_rawDescGZIP(), []int{71} } func (x *MintJWTResponse) GetActorJwt() string { @@ -2971,7 +4953,7 @@ type MintCertRequest struct { func (x *MintCertRequest) Reset() { *x = MintCertRequest{} - mi := &file_ateapi_proto_msgTypes[43] + mi := &file_ateapi_proto_msgTypes[72] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2983,7 +4965,7 @@ func (x *MintCertRequest) String() string { func (*MintCertRequest) ProtoMessage() {} func (x *MintCertRequest) ProtoReflect() protoreflect.Message { - mi := &file_ateapi_proto_msgTypes[43] + mi := &file_ateapi_proto_msgTypes[72] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2996,7 +4978,7 @@ func (x *MintCertRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use MintCertRequest.ProtoReflect.Descriptor instead. func (*MintCertRequest) Descriptor() ([]byte, []int) { - return file_ateapi_proto_rawDescGZIP(), []int{43} + return file_ateapi_proto_rawDescGZIP(), []int{72} } func (x *MintCertRequest) GetWorkerNamespace() string { @@ -3053,7 +5035,7 @@ type MintCertResponse struct { func (x *MintCertResponse) Reset() { *x = MintCertResponse{} - mi := &file_ateapi_proto_msgTypes[44] + mi := &file_ateapi_proto_msgTypes[73] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3065,7 +5047,7 @@ func (x *MintCertResponse) String() string { func (*MintCertResponse) ProtoMessage() {} func (x *MintCertResponse) ProtoReflect() protoreflect.Message { - mi := &file_ateapi_proto_msgTypes[44] + mi := &file_ateapi_proto_msgTypes[73] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3078,7 +5060,7 @@ func (x *MintCertResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use MintCertResponse.ProtoReflect.Descriptor instead. func (*MintCertResponse) Descriptor() ([]byte, []int) { - return file_ateapi_proto_rawDescGZIP(), []int{44} + return file_ateapi_proto_rawDescGZIP(), []int{73} } func (x *MintCertResponse) GetActorCertificates() [][]byte { @@ -3126,11 +5108,12 @@ const file_ateapi_proto_rawDesc = "" + "\x12STATUS_UNSPECIFIED\x10\x00\x12\x12\n" + "\x0eSTATUS_PENDING\x10\x01\x12\x12\n" + "\x0eSTATUS_CREATED\x10\x02\x12\x13\n" + - "\x0fSTATUS_DELETING\x10\x03\"\xbe\a\n" + + "\x0fSTATUS_DELETING\x10\x03\"\x87\b\n" + "\x05Actor\x124\n" + "\bmetadata\x18\x01 \x01(\v2\x18.ateapi.ResourceMetadataR\bmetadata\x128\n" + "\x18actor_template_namespace\x18\x02 \x01(\tR\x16actorTemplateNamespace\x12.\n" + - "\x13actor_template_name\x18\x03 \x01(\tR\x11actorTemplateName\x12,\n" + + "\x13actor_template_name\x18\x03 \x01(\tR\x11actorTemplateName\x12G\n" + + "\x16actor_template_version\x18\r \x01(\v2\x11.ateapi.ObjectRefR\x14actorTemplateVersion\x12,\n" + "\x06status\x18\x04 \x01(\x0e2\x14.ateapi.Actor.StatusR\x06status\x12E\n" + "\x11worker_assignment\x18\x05 \x01(\v2\x18.ateapi.WorkerAssignmentR\x10workerAssignment\x129\n" + "\x19in_progress_snapshot_name\x18\x06 \x01(\tR\x16inProgressSnapshotName\x129\n" + @@ -3158,7 +5141,7 @@ const file_ateapi_proto_rawDesc = "" + "\n" + "worker_pod\x18\x03 \x01(\tR\tworkerPod\x12$\n" + "\x0eworker_pod_uid\x18\x04 \x01(\tR\fworkerPodUid\x12\"\n" + - "\rworker_pod_ip\x18\x05 \x01(\tR\vworkerPodIp\"\xd5\x03\n" + + "\rworker_pod_ip\x18\x05 \x01(\tR\vworkerPodIp\"\x9e\x04\n" + "\rActorSnapshot\x124\n" + "\bmetadata\x18\x01 \x01(\v2\x18.ateapi.ResourceMetadataR\bmetadata\x124\n" + "\fsource_actor\x18\x02 \x01(\v2\x11.ateapi.ObjectRefR\vsourceActor\x12(\n" + @@ -3168,7 +5151,9 @@ const file_ateapi_proto_rawDesc = "" + "\x13actor_template_name\x18\x06 \x01(\tR\x11actorTemplateName\x12,\n" + "\x12actor_template_uid\x18\a \x01(\tR\x10actorTemplateUid\x12A\n" + "\rcontent_scope\x18\b \x01(\x0e2\x1c.ateapi.SnapshotContentScopeR\fcontentScope\x12!\n" + - "\fsnapshot_uri\x18\t \x01(\tR\vsnapshotUri\"\xac\x01\n" + + "\fsnapshot_uri\x18\t \x01(\tR\vsnapshotUri\x12G\n" + + "\x16actor_template_version\x18\n" + + " \x01(\v2\x11.ateapi.ObjectRefR\x14actorTemplateVersion\"\xac\x01\n" + "\x10ActorSnapshotTag\x124\n" + "\bmetadata\x18\x01 \x01(\v2\x18.ateapi.ResourceMetadataR\bmetadata\x12-\n" + "\bsnapshot\x18\x02 \x01(\v2\x11.ateapi.ObjectRefR\bsnapshot\x123\n" + @@ -3181,7 +5166,98 @@ const file_ateapi_proto_rawDesc = "" + "\x10ActorSnapshotRef\x12/\n" + "\bsnapshot\x18\x01 \x01(\v2\x11.ateapi.ObjectRefH\x00R\bsnapshot\x12%\n" + "\x03tag\x18\x02 \x01(\v2\x11.ateapi.ObjectRefH\x00R\x03tagB\v\n" + - "\treference\"E\n" + + "\treference\"\xa6\x01\n" + + "\x10ActorTemplateRef\x12I\n" + + "\x16actor_template_version\x18\x01 \x01(\v2\x11.ateapi.ObjectRefH\x00R\x14actorTemplateVersion\x12:\n" + + "\x0eactor_template\x18\x02 \x01(\v2\x11.ateapi.ObjectRefH\x00R\ractorTemplateB\v\n" + + "\treference\"\x93\x01\n" + + "\rActorTemplate\x124\n" + + "\bmetadata\x18\x01 \x01(\v2\x18.ateapi.ResourceMetadataR\bmetadata\x12L\n" + + "\x19default_version_on_create\x18\x03 \x01(\v2\x11.ateapi.ObjectRefR\x16defaultVersionOnCreate\"\x95\x04\n" + + "\x14ActorTemplateVersion\x124\n" + + "\bmetadata\x18\x01 \x01(\v2\x18.ateapi.ResourceMetadataR\bmetadata\x128\n" + + "\x0eactor_template\x18\x02 \x01(\v2\x11.ateapi.ObjectRefR\ractorTemplate\x129\n" + + "\x0fworker_selector\x18\x03 \x01(\v2\x10.ateapi.SelectorR\x0eworkerSelector\x121\n" + + "\n" + + "containers\x18\x04 \x03(\v2\x11.ateapi.ContainerR\n" + + "containers\x12(\n" + + "\avolumes\x18\x05 \x03(\v2\x0e.ateapi.VolumeR\avolumes\x12B\n" + + "\x10snapshots_config\x18\x06 \x01(\v2\x17.ateapi.SnapshotsConfigR\x0fsnapshotsConfig\x12<\n" + + "\x0esandbox_config\x18\a \x01(\v2\x15.ateapi.SandboxConfigR\rsandboxConfig\x12:\n" + + "\x0fgolden_snapshot\x18\b \x01(\v2\x11.ateapi.ObjectRefR\x0egoldenSnapshot\x127\n" + + "\x05phase\x18\t \x01(\v2!.ateapi.ActorTemplateVersionPhaseR\x05phase\"\x87\x02\n" + + "\x19ActorTemplateVersionPhase\x12=\n" + + "\x05phase\x18\x01 \x01(\x0e2'.ateapi.ActorTemplateVersionPhase.PhaseR\x05phase\x12\x18\n" + + "\amessage\x18\x02 \x01(\tR\amessage\"\x90\x01\n" + + "\x05Phase\x12\x15\n" + + "\x11PHASE_UNSPECIFIED\x10\x00\x12\x11\n" + + "\rPHASE_INITIAL\x10\x01\x12\x1d\n" + + "\x19PHASE_RESUME_GOLDEN_ACTOR\x10\x02\x12\x1b\n" + + "\x17PHASE_WAIT_GOLDEN_ACTOR\x10\x03\x12\x0f\n" + + "\vPHASE_READY\x10\x04\x12\x10\n" + + "\fPHASE_FAILED\x10\x05\"\xca\x01\n" + + "\rSandboxConfig\x129\n" + + "\rsandbox_class\x18\x01 \x01(\x0e2\x14.ateapi.SandboxClassR\fsandboxClass\x12\x1f\n" + + "\vconfig_name\x18\x02 \x01(\tR\n" + + "configName\x12<\n" + + "\x0esandbox_assets\x18\x03 \x01(\v2\x15.ateapi.SandboxAssetsR\rsandboxAssets\x12\x1f\n" + + "\vpause_image\x18\x04 \x01(\tR\n" + + "pauseImage\"\xe5\x01\n" + + "\x0fSnapshotsConfig\x127\n" + + "\bon_pause\x18\x01 \x01(\x0e2\x1c.ateapi.SnapshotContentScopeR\aonPause\x129\n" + + "\ton_commit\x18\x02 \x01(\x0e2\x1c.ateapi.SnapshotContentScopeR\bonCommit\x123\n" + + "\ton_resume\x18\x03 \x01(\v2\x16.ateapi.OnResumeConfigR\bonResume\x12)\n" + + "\x10storage_location\x18\x04 \x01(\tR\x0fstorageLocation\"C\n" + + "\x0eOnResumeConfig\x121\n" + + "\tfrom_data\x18\x01 \x01(\x0e2\x14.ateapi.ResumeSourceR\bfromData\"\xf0\x01\n" + + "\tContainer\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n" + + "\x05image\x18\x02 \x01(\tR\x05image\x12\x18\n" + + "\acommand\x18\x03 \x03(\tR\acommand\x12\x12\n" + + "\x04args\x18\x04 \x03(\tR\x04args\x12 \n" + + "\x03env\x18\x05 \x03(\v2\x0e.ateapi.EnvVarR\x03env\x12/\n" + + "\x06readyz\x18\x06 \x01(\v2\x17.ateapi.ContainerReadyzR\x06readyz\x128\n" + + "\rvolume_mounts\x18\a \x03(\v2\x13.ateapi.VolumeMountR\fvolumeMounts\">\n" + + "\x06EnvVar\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12\x16\n" + + "\x05value\x18\x02 \x01(\tH\x00R\x05valueB\b\n" + + "\x06source\"l\n" + + "\x0fContainerReadyz\x120\n" + + "\bhttp_get\x18\x01 \x01(\v2\x15.ateapi.HTTPGetActionR\ahttpGet\x12'\n" + + "\x0ftimeout_seconds\x18\x02 \x01(\x05R\x0etimeoutSeconds\"7\n" + + "\rHTTPGetAction\x12\x12\n" + + "\x04path\x18\x01 \x01(\tR\x04path\x12\x12\n" + + "\x04port\x18\x02 \x01(\x05R\x04port\"\xc5\x01\n" + + "\x06Volume\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12A\n" + + "\vdurable_dir\x18\x02 \x01(\v2\x1e.ateapi.DurableDirVolumeSourceH\x00R\n" + + "durableDir\x12Z\n" + + "\x18external_volume_template\x18\x03 \x01(\v2\x1e.ateapi.ExternalVolumeTemplateH\x00R\x16externalVolumeTemplateB\b\n" + + "\x06source\"\x18\n" + + "\x16DurableDirVolumeSource\"b\n" + + "\x16ExternalVolumeTemplate\x12\x1a\n" + + "\bcapacity\x18\x01 \x01(\tR\bcapacity\x12,\n" + + "\x12storage_class_name\x18\x02 \x01(\tR\x10storageClassName\"@\n" + + "\vVolumeMount\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12\x1d\n" + + "\n" + + "mount_path\x18\x02 \x01(\tR\tmountPath\"\xd4\x01\n" + + "\rSandboxAssets\x129\n" + + "\rsandbox_class\x18\x01 \x01(\x0e2\x14.ateapi.SandboxClassR\fsandboxClass\x129\n" + + "\x06assets\x18\x02 \x03(\v2!.ateapi.SandboxAssets.AssetsEntryR\x06assets\x1aM\n" + + "\vAssetsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12(\n" + + "\x05value\x18\x02 \x01(\v2\x12.ateapi.ArchAssetsR\x05value:\x028\x01\"\x8e\x01\n" + + "\n" + + "ArchAssets\x123\n" + + "\x05files\x18\x01 \x03(\v2\x1d.ateapi.ArchAssets.FilesEntryR\x05files\x1aK\n" + + "\n" + + "FilesEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12'\n" + + "\x05value\x18\x02 \x01(\v2\x11.ateapi.AssetFileR\x05value:\x028\x01\"5\n" + + "\tAssetFile\x12\x10\n" + + "\x03url\x18\x01 \x01(\tR\x03url\x12\x16\n" + + "\x06sha256\x18\x02 \x01(\tR\x06sha256\"E\n" + "\x15CreateAtespaceRequest\x12,\n" + "\batespace\x18\x01 \x01(\v2\x10.ateapi.AtespaceR\batespace\"C\n" + "\x12GetAtespaceRequest\x12-\n" + @@ -3194,7 +5270,40 @@ const file_ateapi_proto_rawDesc = "" + "\tatespaces\x18\x01 \x03(\v2\x10.ateapi.AtespaceR\tatespaces\x12&\n" + "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"F\n" + "\x15DeleteAtespaceRequest\x12-\n" + - "\batespace\x18\x01 \x01(\v2\x11.ateapi.ObjectRefR\batespace\":\n" + + "\batespace\x18\x01 \x01(\v2\x11.ateapi.ObjectRefR\batespace\"Z\n" + + "\x1aCreateActorTemplateRequest\x12<\n" + + "\x0eactor_template\x18\x01 \x01(\v2\x15.ateapi.ActorTemplateR\ractorTemplate\"S\n" + + "\x17GetActorTemplateRequest\x128\n" + + "\x0eactor_template\x18\x01 \x01(\v2\x11.ateapi.ObjectRefR\ractorTemplate\"\x97\x01\n" + + "\x1aUpdateActorTemplateRequest\x12<\n" + + "\x0eactor_template\x18\x01 \x01(\v2\x15.ateapi.ActorTemplateR\ractorTemplate\x12;\n" + + "\vupdate_mask\x18\x02 \x01(\v2\x1a.google.protobuf.FieldMaskR\n" + + "updateMask\"s\n" + + "\x19ListActorTemplatesRequest\x12\x1a\n" + + "\batespace\x18\x01 \x01(\tR\batespace\x12\x1b\n" + + "\tpage_size\x18\x02 \x01(\x05R\bpageSize\x12\x1d\n" + + "\n" + + "page_token\x18\x03 \x01(\tR\tpageToken\"\x84\x01\n" + + "\x1aListActorTemplatesResponse\x12>\n" + + "\x0factor_templates\x18\x01 \x03(\v2\x15.ateapi.ActorTemplateR\x0eactorTemplates\x12&\n" + + "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"V\n" + + "\x1aDeleteActorTemplateRequest\x128\n" + + "\x0eactor_template\x18\x01 \x01(\v2\x11.ateapi.ObjectRefR\ractorTemplate\"w\n" + + "!CreateActorTemplateVersionRequest\x12R\n" + + "\x16actor_template_version\x18\x01 \x01(\v2\x1c.ateapi.ActorTemplateVersionR\x14actorTemplateVersion\"i\n" + + "\x1eGetActorTemplateVersionRequest\x12G\n" + + "\x16actor_template_version\x18\x01 \x01(\v2\x11.ateapi.ObjectRefR\x14actorTemplateVersion\"\xb4\x01\n" + + " ListActorTemplateVersionsRequest\x128\n" + + "\x0eactor_template\x18\x01 \x01(\v2\x11.ateapi.ObjectRefR\ractorTemplate\x12\x1a\n" + + "\batespace\x18\x02 \x01(\tR\batespace\x12\x1b\n" + + "\tpage_size\x18\x03 \x01(\x05R\bpageSize\x12\x1d\n" + + "\n" + + "page_token\x18\x04 \x01(\tR\tpageToken\"\xa1\x01\n" + + "!ListActorTemplateVersionsResponse\x12T\n" + + "\x17actor_template_versions\x18\x01 \x03(\v2\x1c.ateapi.ActorTemplateVersionR\x15actorTemplateVersions\x12&\n" + + "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"l\n" + + "!DeleteActorTemplateVersionRequest\x12G\n" + + "\x16actor_template_version\x18\x01 \x01(\v2\x11.ateapi.ObjectRefR\x14actorTemplateVersion\":\n" + "\x0fGetActorRequest\x12'\n" + "\x05actor\x18\x01 \x01(\v2\x11.ateapi.ObjectRefR\x05actor\"|\n" + "\x12CreateActorRequest\x12#\n" + @@ -3312,11 +5421,18 @@ const file_ateapi_proto_rawDesc = "" + "\x1bSNAPSHOT_CONTENT_SCOPE_DATA\x10\x02*f\n" + "\x15ActorSnapshotTagScope\x12%\n" + "!ACTOR_SNAPSHOT_TAG_SCOPE_ATESPACE\x10\x00\x12&\n" + - "\"ACTOR_SNAPSHOT_TAG_SCOPE_PUBLISHED\x10\x01*k\n" + + "\"ACTOR_SNAPSHOT_TAG_SCOPE_PUBLISHED\x10\x01*b\n" + + "\fSandboxClass\x12\x1d\n" + + "\x19SANDBOX_CLASS_UNSPECIFIED\x10\x00\x12\x18\n" + + "\x14SANDBOX_CLASS_GVISOR\x10\x01\x12\x19\n" + + "\x15SANDBOX_CLASS_MICROVM\x10\x02*d\n" + + "\fResumeSource\x12\x1d\n" + + "\x19RESUME_SOURCE_UNSPECIFIED\x10\x00\x12\x1b\n" + + "\x17RESUME_SOURCE_COLD_BOOT\x10\x01\x12\x18\n" + + "\x14RESUME_SOURCE_GOLDEN\x10\x02*k\n" + "\x17ActorCertificatePurpose\x12)\n" + "%ACTOR_CERTIFICATE_PURPOSE_UNSPECIFIED\x10\x00\x12%\n" + - "!ACTOR_CERTIFICATE_PURPOSE_ATUNNEL\x10\x012\xb3\n" + - "\n" + + "!ACTOR_CERTIFICATE_PURPOSE_ATUNNEL\x10\x012\x85\x11\n" + "\aControl\x124\n" + "\bGetActor\x12\x17.ateapi.GetActorRequest\x1a\r.ateapi.Actor\"\x00\x12:\n" + "\vCreateActor\x12\x1a.ateapi.CreateActorRequest\x1a\r.ateapi.Actor\"\x00\x12:\n" + @@ -3337,7 +5453,16 @@ const file_ateapi_proto_rawDesc = "" + "\x0eCreateAtespace\x12\x1d.ateapi.CreateAtespaceRequest\x1a\x10.ateapi.Atespace\"\x00\x12=\n" + "\vGetAtespace\x12\x1a.ateapi.GetAtespaceRequest\x1a\x10.ateapi.Atespace\"\x00\x12N\n" + "\rListAtespaces\x12\x1c.ateapi.ListAtespacesRequest\x1a\x1d.ateapi.ListAtespacesResponse\"\x00\x12C\n" + - "\x0eDeleteAtespace\x12\x1d.ateapi.DeleteAtespaceRequest\x1a\x10.ateapi.Atespace\"\x002N\n" + + "\x0eDeleteAtespace\x12\x1d.ateapi.DeleteAtespaceRequest\x1a\x10.ateapi.Atespace\"\x00\x12R\n" + + "\x13CreateActorTemplate\x12\".ateapi.CreateActorTemplateRequest\x1a\x15.ateapi.ActorTemplate\"\x00\x12L\n" + + "\x10GetActorTemplate\x12\x1f.ateapi.GetActorTemplateRequest\x1a\x15.ateapi.ActorTemplate\"\x00\x12R\n" + + "\x13UpdateActorTemplate\x12\".ateapi.UpdateActorTemplateRequest\x1a\x15.ateapi.ActorTemplate\"\x00\x12]\n" + + "\x12ListActorTemplates\x12!.ateapi.ListActorTemplatesRequest\x1a\".ateapi.ListActorTemplatesResponse\"\x00\x12R\n" + + "\x13DeleteActorTemplate\x12\".ateapi.DeleteActorTemplateRequest\x1a\x15.ateapi.ActorTemplate\"\x00\x12g\n" + + "\x1aCreateActorTemplateVersion\x12).ateapi.CreateActorTemplateVersionRequest\x1a\x1c.ateapi.ActorTemplateVersion\"\x00\x12a\n" + + "\x17GetActorTemplateVersion\x12&.ateapi.GetActorTemplateVersionRequest\x1a\x1c.ateapi.ActorTemplateVersion\"\x00\x12r\n" + + "\x19ListActorTemplateVersions\x12(.ateapi.ListActorTemplateVersionsRequest\x1a).ateapi.ListActorTemplateVersionsResponse\"\x00\x12g\n" + + "\x1aDeleteActorTemplateVersion\x12).ateapi.DeleteActorTemplateVersionRequest\x1a\x1c.ateapi.ActorTemplateVersion\"\x002N\n" + "\x05Debug\x12E\n" + "\n" + "DebugClear\x12\x19.ateapi.DebugClearRequest\x1a\x1a.ateapi.DebugClearResponse\"\x002\x8a\x01\n" + @@ -3357,167 +5482,263 @@ func file_ateapi_proto_rawDescGZIP() []byte { return file_ateapi_proto_rawDescData } -var file_ateapi_proto_enumTypes = make([]protoimpl.EnumInfo, 6) -var file_ateapi_proto_msgTypes = make([]protoimpl.MessageInfo, 48) +var file_ateapi_proto_enumTypes = make([]protoimpl.EnumInfo, 9) +var file_ateapi_proto_msgTypes = make([]protoimpl.MessageInfo, 79) var file_ateapi_proto_goTypes = []any{ - (SnapshotContentScope)(0), // 0: ateapi.SnapshotContentScope - (ActorSnapshotTagScope)(0), // 1: ateapi.ActorSnapshotTagScope - (ActorCertificatePurpose)(0), // 2: ateapi.ActorCertificatePurpose - (ExternalVolume_Status)(0), // 3: ateapi.ExternalVolume.Status - (Actor_Status)(0), // 4: ateapi.Actor.Status - (Worker_State)(0), // 5: ateapi.Worker.State - (*LocalSnapshotInfo)(nil), // 6: ateapi.LocalSnapshotInfo - (*Selector)(nil), // 7: ateapi.Selector - (*ResourceMetadata)(nil), // 8: ateapi.ResourceMetadata - (*ExternalVolume)(nil), // 9: ateapi.ExternalVolume - (*Actor)(nil), // 10: ateapi.Actor - (*WorkerAssignment)(nil), // 11: ateapi.WorkerAssignment - (*ActorSnapshot)(nil), // 12: ateapi.ActorSnapshot - (*ActorSnapshotTag)(nil), // 13: ateapi.ActorSnapshotTag - (*Atespace)(nil), // 14: ateapi.Atespace - (*ObjectRef)(nil), // 15: ateapi.ObjectRef - (*ActorSnapshotRef)(nil), // 16: ateapi.ActorSnapshotRef - (*CreateAtespaceRequest)(nil), // 17: ateapi.CreateAtespaceRequest - (*GetAtespaceRequest)(nil), // 18: ateapi.GetAtespaceRequest - (*ListAtespacesRequest)(nil), // 19: ateapi.ListAtespacesRequest - (*ListAtespacesResponse)(nil), // 20: ateapi.ListAtespacesResponse - (*DeleteAtespaceRequest)(nil), // 21: ateapi.DeleteAtespaceRequest - (*GetActorRequest)(nil), // 22: ateapi.GetActorRequest - (*CreateActorRequest)(nil), // 23: ateapi.CreateActorRequest - (*UpdateActorRequest)(nil), // 24: ateapi.UpdateActorRequest - (*SuspendActorRequest)(nil), // 25: ateapi.SuspendActorRequest - (*SuspendActorResponse)(nil), // 26: ateapi.SuspendActorResponse - (*PauseActorRequest)(nil), // 27: ateapi.PauseActorRequest - (*PauseActorResponse)(nil), // 28: ateapi.PauseActorResponse - (*ResumeActorRequest)(nil), // 29: ateapi.ResumeActorRequest - (*ResumeActorResponse)(nil), // 30: ateapi.ResumeActorResponse - (*DeleteActorRequest)(nil), // 31: ateapi.DeleteActorRequest - (*GetActorSnapshotRequest)(nil), // 32: ateapi.GetActorSnapshotRequest - (*ListActorSnapshotsRequest)(nil), // 33: ateapi.ListActorSnapshotsRequest - (*ListActorSnapshotsResponse)(nil), // 34: ateapi.ListActorSnapshotsResponse - (*TagActorSnapshotRequest)(nil), // 35: ateapi.TagActorSnapshotRequest - (*UpdateActorSnapshotTagRequest)(nil), // 36: ateapi.UpdateActorSnapshotTagRequest - (*DeleteActorSnapshotTagRequest)(nil), // 37: ateapi.DeleteActorSnapshotTagRequest - (*ListWorkersRequest)(nil), // 38: ateapi.ListWorkersRequest - (*ListWorkersResponse)(nil), // 39: ateapi.ListWorkersResponse - (*ListActorsRequest)(nil), // 40: ateapi.ListActorsRequest - (*ListActorsResponse)(nil), // 41: ateapi.ListActorsResponse - (*Worker)(nil), // 42: ateapi.Worker - (*Assignment)(nil), // 43: ateapi.Assignment - (*KubeNamespacedObjectRef)(nil), // 44: ateapi.KubeNamespacedObjectRef - (*DebugClearRequest)(nil), // 45: ateapi.DebugClearRequest - (*DebugClearResponse)(nil), // 46: ateapi.DebugClearResponse - (*MintJWTRequest)(nil), // 47: ateapi.MintJWTRequest - (*MintJWTResponse)(nil), // 48: ateapi.MintJWTResponse - (*MintCertRequest)(nil), // 49: ateapi.MintCertRequest - (*MintCertResponse)(nil), // 50: ateapi.MintCertResponse - nil, // 51: ateapi.Selector.MatchLabelsEntry - nil, // 52: ateapi.ExternalVolume.VolumeContextEntry - nil, // 53: ateapi.Worker.LabelsEntry - (*timestamppb.Timestamp)(nil), // 54: google.protobuf.Timestamp - (*fieldmaskpb.FieldMask)(nil), // 55: google.protobuf.FieldMask + (SnapshotContentScope)(0), // 0: ateapi.SnapshotContentScope + (ActorSnapshotTagScope)(0), // 1: ateapi.ActorSnapshotTagScope + (SandboxClass)(0), // 2: ateapi.SandboxClass + (ResumeSource)(0), // 3: ateapi.ResumeSource + (ActorCertificatePurpose)(0), // 4: ateapi.ActorCertificatePurpose + (ExternalVolume_Status)(0), // 5: ateapi.ExternalVolume.Status + (Actor_Status)(0), // 6: ateapi.Actor.Status + (ActorTemplateVersionPhase_Phase)(0), // 7: ateapi.ActorTemplateVersionPhase.Phase + (Worker_State)(0), // 8: ateapi.Worker.State + (*LocalSnapshotInfo)(nil), // 9: ateapi.LocalSnapshotInfo + (*Selector)(nil), // 10: ateapi.Selector + (*ResourceMetadata)(nil), // 11: ateapi.ResourceMetadata + (*ExternalVolume)(nil), // 12: ateapi.ExternalVolume + (*Actor)(nil), // 13: ateapi.Actor + (*WorkerAssignment)(nil), // 14: ateapi.WorkerAssignment + (*ActorSnapshot)(nil), // 15: ateapi.ActorSnapshot + (*ActorSnapshotTag)(nil), // 16: ateapi.ActorSnapshotTag + (*Atespace)(nil), // 17: ateapi.Atespace + (*ObjectRef)(nil), // 18: ateapi.ObjectRef + (*ActorSnapshotRef)(nil), // 19: ateapi.ActorSnapshotRef + (*ActorTemplateRef)(nil), // 20: ateapi.ActorTemplateRef + (*ActorTemplate)(nil), // 21: ateapi.ActorTemplate + (*ActorTemplateVersion)(nil), // 22: ateapi.ActorTemplateVersion + (*ActorTemplateVersionPhase)(nil), // 23: ateapi.ActorTemplateVersionPhase + (*SandboxConfig)(nil), // 24: ateapi.SandboxConfig + (*SnapshotsConfig)(nil), // 25: ateapi.SnapshotsConfig + (*OnResumeConfig)(nil), // 26: ateapi.OnResumeConfig + (*Container)(nil), // 27: ateapi.Container + (*EnvVar)(nil), // 28: ateapi.EnvVar + (*ContainerReadyz)(nil), // 29: ateapi.ContainerReadyz + (*HTTPGetAction)(nil), // 30: ateapi.HTTPGetAction + (*Volume)(nil), // 31: ateapi.Volume + (*DurableDirVolumeSource)(nil), // 32: ateapi.DurableDirVolumeSource + (*ExternalVolumeTemplate)(nil), // 33: ateapi.ExternalVolumeTemplate + (*VolumeMount)(nil), // 34: ateapi.VolumeMount + (*SandboxAssets)(nil), // 35: ateapi.SandboxAssets + (*ArchAssets)(nil), // 36: ateapi.ArchAssets + (*AssetFile)(nil), // 37: ateapi.AssetFile + (*CreateAtespaceRequest)(nil), // 38: ateapi.CreateAtespaceRequest + (*GetAtespaceRequest)(nil), // 39: ateapi.GetAtespaceRequest + (*ListAtespacesRequest)(nil), // 40: ateapi.ListAtespacesRequest + (*ListAtespacesResponse)(nil), // 41: ateapi.ListAtespacesResponse + (*DeleteAtespaceRequest)(nil), // 42: ateapi.DeleteAtespaceRequest + (*CreateActorTemplateRequest)(nil), // 43: ateapi.CreateActorTemplateRequest + (*GetActorTemplateRequest)(nil), // 44: ateapi.GetActorTemplateRequest + (*UpdateActorTemplateRequest)(nil), // 45: ateapi.UpdateActorTemplateRequest + (*ListActorTemplatesRequest)(nil), // 46: ateapi.ListActorTemplatesRequest + (*ListActorTemplatesResponse)(nil), // 47: ateapi.ListActorTemplatesResponse + (*DeleteActorTemplateRequest)(nil), // 48: ateapi.DeleteActorTemplateRequest + (*CreateActorTemplateVersionRequest)(nil), // 49: ateapi.CreateActorTemplateVersionRequest + (*GetActorTemplateVersionRequest)(nil), // 50: ateapi.GetActorTemplateVersionRequest + (*ListActorTemplateVersionsRequest)(nil), // 51: ateapi.ListActorTemplateVersionsRequest + (*ListActorTemplateVersionsResponse)(nil), // 52: ateapi.ListActorTemplateVersionsResponse + (*DeleteActorTemplateVersionRequest)(nil), // 53: ateapi.DeleteActorTemplateVersionRequest + (*GetActorRequest)(nil), // 54: ateapi.GetActorRequest + (*CreateActorRequest)(nil), // 55: ateapi.CreateActorRequest + (*UpdateActorRequest)(nil), // 56: ateapi.UpdateActorRequest + (*SuspendActorRequest)(nil), // 57: ateapi.SuspendActorRequest + (*SuspendActorResponse)(nil), // 58: ateapi.SuspendActorResponse + (*PauseActorRequest)(nil), // 59: ateapi.PauseActorRequest + (*PauseActorResponse)(nil), // 60: ateapi.PauseActorResponse + (*ResumeActorRequest)(nil), // 61: ateapi.ResumeActorRequest + (*ResumeActorResponse)(nil), // 62: ateapi.ResumeActorResponse + (*DeleteActorRequest)(nil), // 63: ateapi.DeleteActorRequest + (*GetActorSnapshotRequest)(nil), // 64: ateapi.GetActorSnapshotRequest + (*ListActorSnapshotsRequest)(nil), // 65: ateapi.ListActorSnapshotsRequest + (*ListActorSnapshotsResponse)(nil), // 66: ateapi.ListActorSnapshotsResponse + (*TagActorSnapshotRequest)(nil), // 67: ateapi.TagActorSnapshotRequest + (*UpdateActorSnapshotTagRequest)(nil), // 68: ateapi.UpdateActorSnapshotTagRequest + (*DeleteActorSnapshotTagRequest)(nil), // 69: ateapi.DeleteActorSnapshotTagRequest + (*ListWorkersRequest)(nil), // 70: ateapi.ListWorkersRequest + (*ListWorkersResponse)(nil), // 71: ateapi.ListWorkersResponse + (*ListActorsRequest)(nil), // 72: ateapi.ListActorsRequest + (*ListActorsResponse)(nil), // 73: ateapi.ListActorsResponse + (*Worker)(nil), // 74: ateapi.Worker + (*Assignment)(nil), // 75: ateapi.Assignment + (*KubeNamespacedObjectRef)(nil), // 76: ateapi.KubeNamespacedObjectRef + (*DebugClearRequest)(nil), // 77: ateapi.DebugClearRequest + (*DebugClearResponse)(nil), // 78: ateapi.DebugClearResponse + (*MintJWTRequest)(nil), // 79: ateapi.MintJWTRequest + (*MintJWTResponse)(nil), // 80: ateapi.MintJWTResponse + (*MintCertRequest)(nil), // 81: ateapi.MintCertRequest + (*MintCertResponse)(nil), // 82: ateapi.MintCertResponse + nil, // 83: ateapi.Selector.MatchLabelsEntry + nil, // 84: ateapi.ExternalVolume.VolumeContextEntry + nil, // 85: ateapi.SandboxAssets.AssetsEntry + nil, // 86: ateapi.ArchAssets.FilesEntry + nil, // 87: ateapi.Worker.LabelsEntry + (*timestamppb.Timestamp)(nil), // 88: google.protobuf.Timestamp + (*fieldmaskpb.FieldMask)(nil), // 89: google.protobuf.FieldMask } var file_ateapi_proto_depIdxs = []int32{ - 0, // 0: ateapi.LocalSnapshotInfo.content_scope:type_name -> ateapi.SnapshotContentScope - 51, // 1: ateapi.Selector.match_labels:type_name -> ateapi.Selector.MatchLabelsEntry - 54, // 2: ateapi.ResourceMetadata.create_time:type_name -> google.protobuf.Timestamp - 54, // 3: ateapi.ResourceMetadata.update_time:type_name -> google.protobuf.Timestamp - 3, // 4: ateapi.ExternalVolume.status:type_name -> ateapi.ExternalVolume.Status - 52, // 5: ateapi.ExternalVolume.volume_context:type_name -> ateapi.ExternalVolume.VolumeContextEntry - 8, // 6: ateapi.Actor.metadata:type_name -> ateapi.ResourceMetadata - 4, // 7: ateapi.Actor.status:type_name -> ateapi.Actor.Status - 11, // 8: ateapi.Actor.worker_assignment:type_name -> ateapi.WorkerAssignment - 7, // 9: ateapi.Actor.worker_selector:type_name -> ateapi.Selector - 15, // 10: ateapi.Actor.latest_snapshot:type_name -> ateapi.ObjectRef - 6, // 11: ateapi.Actor.local_snapshot_info:type_name -> ateapi.LocalSnapshotInfo - 9, // 12: ateapi.Actor.actor_volumes:type_name -> ateapi.ExternalVolume - 8, // 13: ateapi.ActorSnapshot.metadata:type_name -> ateapi.ResourceMetadata - 15, // 14: ateapi.ActorSnapshot.source_actor:type_name -> ateapi.ObjectRef - 0, // 15: ateapi.ActorSnapshot.content_scope:type_name -> ateapi.SnapshotContentScope - 8, // 16: ateapi.ActorSnapshotTag.metadata:type_name -> ateapi.ResourceMetadata - 15, // 17: ateapi.ActorSnapshotTag.snapshot:type_name -> ateapi.ObjectRef - 1, // 18: ateapi.ActorSnapshotTag.scope:type_name -> ateapi.ActorSnapshotTagScope - 8, // 19: ateapi.Atespace.metadata:type_name -> ateapi.ResourceMetadata - 15, // 20: ateapi.ActorSnapshotRef.snapshot:type_name -> ateapi.ObjectRef - 15, // 21: ateapi.ActorSnapshotRef.tag:type_name -> ateapi.ObjectRef - 14, // 22: ateapi.CreateAtespaceRequest.atespace:type_name -> ateapi.Atespace - 15, // 23: ateapi.GetAtespaceRequest.atespace:type_name -> ateapi.ObjectRef - 14, // 24: ateapi.ListAtespacesResponse.atespaces:type_name -> ateapi.Atespace - 15, // 25: ateapi.DeleteAtespaceRequest.atespace:type_name -> ateapi.ObjectRef - 15, // 26: ateapi.GetActorRequest.actor:type_name -> ateapi.ObjectRef - 10, // 27: ateapi.CreateActorRequest.actor:type_name -> ateapi.Actor - 16, // 28: ateapi.CreateActorRequest.source_snapshot:type_name -> ateapi.ActorSnapshotRef - 10, // 29: ateapi.UpdateActorRequest.actor:type_name -> ateapi.Actor - 55, // 30: ateapi.UpdateActorRequest.update_mask:type_name -> google.protobuf.FieldMask - 15, // 31: ateapi.SuspendActorRequest.actor:type_name -> ateapi.ObjectRef - 10, // 32: ateapi.SuspendActorResponse.actor:type_name -> ateapi.Actor - 15, // 33: ateapi.PauseActorRequest.actor:type_name -> ateapi.ObjectRef - 10, // 34: ateapi.PauseActorResponse.actor:type_name -> ateapi.Actor - 15, // 35: ateapi.ResumeActorRequest.actor:type_name -> ateapi.ObjectRef - 10, // 36: ateapi.ResumeActorResponse.actor:type_name -> ateapi.Actor - 15, // 37: ateapi.DeleteActorRequest.actor:type_name -> ateapi.ObjectRef - 16, // 38: ateapi.GetActorSnapshotRequest.snapshot:type_name -> ateapi.ActorSnapshotRef - 12, // 39: ateapi.ListActorSnapshotsResponse.snapshots:type_name -> ateapi.ActorSnapshot - 16, // 40: ateapi.TagActorSnapshotRequest.snapshot:type_name -> ateapi.ActorSnapshotRef - 13, // 41: ateapi.TagActorSnapshotRequest.tag:type_name -> ateapi.ActorSnapshotTag - 13, // 42: ateapi.UpdateActorSnapshotTagRequest.tag:type_name -> ateapi.ActorSnapshotTag - 55, // 43: ateapi.UpdateActorSnapshotTagRequest.update_mask:type_name -> google.protobuf.FieldMask - 15, // 44: ateapi.DeleteActorSnapshotTagRequest.tag:type_name -> ateapi.ObjectRef - 42, // 45: ateapi.ListWorkersResponse.workers:type_name -> ateapi.Worker - 10, // 46: ateapi.ListActorsResponse.actors:type_name -> ateapi.Actor - 43, // 47: ateapi.Worker.assignment:type_name -> ateapi.Assignment - 53, // 48: ateapi.Worker.labels:type_name -> ateapi.Worker.LabelsEntry - 5, // 49: ateapi.Worker.state:type_name -> ateapi.Worker.State - 44, // 50: ateapi.Assignment.actor_template:type_name -> ateapi.KubeNamespacedObjectRef - 15, // 51: ateapi.Assignment.actor:type_name -> ateapi.ObjectRef - 2, // 52: ateapi.MintCertRequest.purpose:type_name -> ateapi.ActorCertificatePurpose - 22, // 53: ateapi.Control.GetActor:input_type -> ateapi.GetActorRequest - 23, // 54: ateapi.Control.CreateActor:input_type -> ateapi.CreateActorRequest - 24, // 55: ateapi.Control.UpdateActor:input_type -> ateapi.UpdateActorRequest - 25, // 56: ateapi.Control.SuspendActor:input_type -> ateapi.SuspendActorRequest - 27, // 57: ateapi.Control.PauseActor:input_type -> ateapi.PauseActorRequest - 29, // 58: ateapi.Control.ResumeActor:input_type -> ateapi.ResumeActorRequest - 31, // 59: ateapi.Control.DeleteActor:input_type -> ateapi.DeleteActorRequest - 32, // 60: ateapi.Control.GetActorSnapshot:input_type -> ateapi.GetActorSnapshotRequest - 33, // 61: ateapi.Control.ListActorSnapshots:input_type -> ateapi.ListActorSnapshotsRequest - 35, // 62: ateapi.Control.TagActorSnapshot:input_type -> ateapi.TagActorSnapshotRequest - 36, // 63: ateapi.Control.UpdateActorSnapshotTag:input_type -> ateapi.UpdateActorSnapshotTagRequest - 37, // 64: ateapi.Control.DeleteActorSnapshotTag:input_type -> ateapi.DeleteActorSnapshotTagRequest - 38, // 65: ateapi.Control.ListWorkers:input_type -> ateapi.ListWorkersRequest - 40, // 66: ateapi.Control.ListActors:input_type -> ateapi.ListActorsRequest - 17, // 67: ateapi.Control.CreateAtespace:input_type -> ateapi.CreateAtespaceRequest - 18, // 68: ateapi.Control.GetAtespace:input_type -> ateapi.GetAtespaceRequest - 19, // 69: ateapi.Control.ListAtespaces:input_type -> ateapi.ListAtespacesRequest - 21, // 70: ateapi.Control.DeleteAtespace:input_type -> ateapi.DeleteAtespaceRequest - 45, // 71: ateapi.Debug.DebugClear:input_type -> ateapi.DebugClearRequest - 47, // 72: ateapi.ActorIdentity.MintJWT:input_type -> ateapi.MintJWTRequest - 49, // 73: ateapi.ActorIdentity.MintCert:input_type -> ateapi.MintCertRequest - 10, // 74: ateapi.Control.GetActor:output_type -> ateapi.Actor - 10, // 75: ateapi.Control.CreateActor:output_type -> ateapi.Actor - 10, // 76: ateapi.Control.UpdateActor:output_type -> ateapi.Actor - 26, // 77: ateapi.Control.SuspendActor:output_type -> ateapi.SuspendActorResponse - 28, // 78: ateapi.Control.PauseActor:output_type -> ateapi.PauseActorResponse - 30, // 79: ateapi.Control.ResumeActor:output_type -> ateapi.ResumeActorResponse - 10, // 80: ateapi.Control.DeleteActor:output_type -> ateapi.Actor - 12, // 81: ateapi.Control.GetActorSnapshot:output_type -> ateapi.ActorSnapshot - 34, // 82: ateapi.Control.ListActorSnapshots:output_type -> ateapi.ListActorSnapshotsResponse - 13, // 83: ateapi.Control.TagActorSnapshot:output_type -> ateapi.ActorSnapshotTag - 13, // 84: ateapi.Control.UpdateActorSnapshotTag:output_type -> ateapi.ActorSnapshotTag - 13, // 85: ateapi.Control.DeleteActorSnapshotTag:output_type -> ateapi.ActorSnapshotTag - 39, // 86: ateapi.Control.ListWorkers:output_type -> ateapi.ListWorkersResponse - 41, // 87: ateapi.Control.ListActors:output_type -> ateapi.ListActorsResponse - 14, // 88: ateapi.Control.CreateAtespace:output_type -> ateapi.Atespace - 14, // 89: ateapi.Control.GetAtespace:output_type -> ateapi.Atespace - 20, // 90: ateapi.Control.ListAtespaces:output_type -> ateapi.ListAtespacesResponse - 14, // 91: ateapi.Control.DeleteAtespace:output_type -> ateapi.Atespace - 46, // 92: ateapi.Debug.DebugClear:output_type -> ateapi.DebugClearResponse - 48, // 93: ateapi.ActorIdentity.MintJWT:output_type -> ateapi.MintJWTResponse - 50, // 94: ateapi.ActorIdentity.MintCert:output_type -> ateapi.MintCertResponse - 74, // [74:95] is the sub-list for method output_type - 53, // [53:74] is the sub-list for method input_type - 53, // [53:53] is the sub-list for extension type_name - 53, // [53:53] is the sub-list for extension extendee - 0, // [0:53] is the sub-list for field type_name + 0, // 0: ateapi.LocalSnapshotInfo.content_scope:type_name -> ateapi.SnapshotContentScope + 83, // 1: ateapi.Selector.match_labels:type_name -> ateapi.Selector.MatchLabelsEntry + 88, // 2: ateapi.ResourceMetadata.create_time:type_name -> google.protobuf.Timestamp + 88, // 3: ateapi.ResourceMetadata.update_time:type_name -> google.protobuf.Timestamp + 5, // 4: ateapi.ExternalVolume.status:type_name -> ateapi.ExternalVolume.Status + 84, // 5: ateapi.ExternalVolume.volume_context:type_name -> ateapi.ExternalVolume.VolumeContextEntry + 11, // 6: ateapi.Actor.metadata:type_name -> ateapi.ResourceMetadata + 18, // 7: ateapi.Actor.actor_template_version:type_name -> ateapi.ObjectRef + 6, // 8: ateapi.Actor.status:type_name -> ateapi.Actor.Status + 14, // 9: ateapi.Actor.worker_assignment:type_name -> ateapi.WorkerAssignment + 10, // 10: ateapi.Actor.worker_selector:type_name -> ateapi.Selector + 18, // 11: ateapi.Actor.latest_snapshot:type_name -> ateapi.ObjectRef + 9, // 12: ateapi.Actor.local_snapshot_info:type_name -> ateapi.LocalSnapshotInfo + 12, // 13: ateapi.Actor.actor_volumes:type_name -> ateapi.ExternalVolume + 11, // 14: ateapi.ActorSnapshot.metadata:type_name -> ateapi.ResourceMetadata + 18, // 15: ateapi.ActorSnapshot.source_actor:type_name -> ateapi.ObjectRef + 0, // 16: ateapi.ActorSnapshot.content_scope:type_name -> ateapi.SnapshotContentScope + 18, // 17: ateapi.ActorSnapshot.actor_template_version:type_name -> ateapi.ObjectRef + 11, // 18: ateapi.ActorSnapshotTag.metadata:type_name -> ateapi.ResourceMetadata + 18, // 19: ateapi.ActorSnapshotTag.snapshot:type_name -> ateapi.ObjectRef + 1, // 20: ateapi.ActorSnapshotTag.scope:type_name -> ateapi.ActorSnapshotTagScope + 11, // 21: ateapi.Atespace.metadata:type_name -> ateapi.ResourceMetadata + 18, // 22: ateapi.ActorSnapshotRef.snapshot:type_name -> ateapi.ObjectRef + 18, // 23: ateapi.ActorSnapshotRef.tag:type_name -> ateapi.ObjectRef + 18, // 24: ateapi.ActorTemplateRef.actor_template_version:type_name -> ateapi.ObjectRef + 18, // 25: ateapi.ActorTemplateRef.actor_template:type_name -> ateapi.ObjectRef + 11, // 26: ateapi.ActorTemplate.metadata:type_name -> ateapi.ResourceMetadata + 18, // 27: ateapi.ActorTemplate.default_version_on_create:type_name -> ateapi.ObjectRef + 11, // 28: ateapi.ActorTemplateVersion.metadata:type_name -> ateapi.ResourceMetadata + 18, // 29: ateapi.ActorTemplateVersion.actor_template:type_name -> ateapi.ObjectRef + 10, // 30: ateapi.ActorTemplateVersion.worker_selector:type_name -> ateapi.Selector + 27, // 31: ateapi.ActorTemplateVersion.containers:type_name -> ateapi.Container + 31, // 32: ateapi.ActorTemplateVersion.volumes:type_name -> ateapi.Volume + 25, // 33: ateapi.ActorTemplateVersion.snapshots_config:type_name -> ateapi.SnapshotsConfig + 24, // 34: ateapi.ActorTemplateVersion.sandbox_config:type_name -> ateapi.SandboxConfig + 18, // 35: ateapi.ActorTemplateVersion.golden_snapshot:type_name -> ateapi.ObjectRef + 23, // 36: ateapi.ActorTemplateVersion.phase:type_name -> ateapi.ActorTemplateVersionPhase + 7, // 37: ateapi.ActorTemplateVersionPhase.phase:type_name -> ateapi.ActorTemplateVersionPhase.Phase + 2, // 38: ateapi.SandboxConfig.sandbox_class:type_name -> ateapi.SandboxClass + 35, // 39: ateapi.SandboxConfig.sandbox_assets:type_name -> ateapi.SandboxAssets + 0, // 40: ateapi.SnapshotsConfig.on_pause:type_name -> ateapi.SnapshotContentScope + 0, // 41: ateapi.SnapshotsConfig.on_commit:type_name -> ateapi.SnapshotContentScope + 26, // 42: ateapi.SnapshotsConfig.on_resume:type_name -> ateapi.OnResumeConfig + 3, // 43: ateapi.OnResumeConfig.from_data:type_name -> ateapi.ResumeSource + 28, // 44: ateapi.Container.env:type_name -> ateapi.EnvVar + 29, // 45: ateapi.Container.readyz:type_name -> ateapi.ContainerReadyz + 34, // 46: ateapi.Container.volume_mounts:type_name -> ateapi.VolumeMount + 30, // 47: ateapi.ContainerReadyz.http_get:type_name -> ateapi.HTTPGetAction + 32, // 48: ateapi.Volume.durable_dir:type_name -> ateapi.DurableDirVolumeSource + 33, // 49: ateapi.Volume.external_volume_template:type_name -> ateapi.ExternalVolumeTemplate + 2, // 50: ateapi.SandboxAssets.sandbox_class:type_name -> ateapi.SandboxClass + 85, // 51: ateapi.SandboxAssets.assets:type_name -> ateapi.SandboxAssets.AssetsEntry + 86, // 52: ateapi.ArchAssets.files:type_name -> ateapi.ArchAssets.FilesEntry + 17, // 53: ateapi.CreateAtespaceRequest.atespace:type_name -> ateapi.Atespace + 18, // 54: ateapi.GetAtespaceRequest.atespace:type_name -> ateapi.ObjectRef + 17, // 55: ateapi.ListAtespacesResponse.atespaces:type_name -> ateapi.Atespace + 18, // 56: ateapi.DeleteAtespaceRequest.atespace:type_name -> ateapi.ObjectRef + 21, // 57: ateapi.CreateActorTemplateRequest.actor_template:type_name -> ateapi.ActorTemplate + 18, // 58: ateapi.GetActorTemplateRequest.actor_template:type_name -> ateapi.ObjectRef + 21, // 59: ateapi.UpdateActorTemplateRequest.actor_template:type_name -> ateapi.ActorTemplate + 89, // 60: ateapi.UpdateActorTemplateRequest.update_mask:type_name -> google.protobuf.FieldMask + 21, // 61: ateapi.ListActorTemplatesResponse.actor_templates:type_name -> ateapi.ActorTemplate + 18, // 62: ateapi.DeleteActorTemplateRequest.actor_template:type_name -> ateapi.ObjectRef + 22, // 63: ateapi.CreateActorTemplateVersionRequest.actor_template_version:type_name -> ateapi.ActorTemplateVersion + 18, // 64: ateapi.GetActorTemplateVersionRequest.actor_template_version:type_name -> ateapi.ObjectRef + 18, // 65: ateapi.ListActorTemplateVersionsRequest.actor_template:type_name -> ateapi.ObjectRef + 22, // 66: ateapi.ListActorTemplateVersionsResponse.actor_template_versions:type_name -> ateapi.ActorTemplateVersion + 18, // 67: ateapi.DeleteActorTemplateVersionRequest.actor_template_version:type_name -> ateapi.ObjectRef + 18, // 68: ateapi.GetActorRequest.actor:type_name -> ateapi.ObjectRef + 13, // 69: ateapi.CreateActorRequest.actor:type_name -> ateapi.Actor + 19, // 70: ateapi.CreateActorRequest.source_snapshot:type_name -> ateapi.ActorSnapshotRef + 13, // 71: ateapi.UpdateActorRequest.actor:type_name -> ateapi.Actor + 89, // 72: ateapi.UpdateActorRequest.update_mask:type_name -> google.protobuf.FieldMask + 18, // 73: ateapi.SuspendActorRequest.actor:type_name -> ateapi.ObjectRef + 13, // 74: ateapi.SuspendActorResponse.actor:type_name -> ateapi.Actor + 18, // 75: ateapi.PauseActorRequest.actor:type_name -> ateapi.ObjectRef + 13, // 76: ateapi.PauseActorResponse.actor:type_name -> ateapi.Actor + 18, // 77: ateapi.ResumeActorRequest.actor:type_name -> ateapi.ObjectRef + 13, // 78: ateapi.ResumeActorResponse.actor:type_name -> ateapi.Actor + 18, // 79: ateapi.DeleteActorRequest.actor:type_name -> ateapi.ObjectRef + 19, // 80: ateapi.GetActorSnapshotRequest.snapshot:type_name -> ateapi.ActorSnapshotRef + 15, // 81: ateapi.ListActorSnapshotsResponse.snapshots:type_name -> ateapi.ActorSnapshot + 19, // 82: ateapi.TagActorSnapshotRequest.snapshot:type_name -> ateapi.ActorSnapshotRef + 16, // 83: ateapi.TagActorSnapshotRequest.tag:type_name -> ateapi.ActorSnapshotTag + 16, // 84: ateapi.UpdateActorSnapshotTagRequest.tag:type_name -> ateapi.ActorSnapshotTag + 89, // 85: ateapi.UpdateActorSnapshotTagRequest.update_mask:type_name -> google.protobuf.FieldMask + 18, // 86: ateapi.DeleteActorSnapshotTagRequest.tag:type_name -> ateapi.ObjectRef + 74, // 87: ateapi.ListWorkersResponse.workers:type_name -> ateapi.Worker + 13, // 88: ateapi.ListActorsResponse.actors:type_name -> ateapi.Actor + 75, // 89: ateapi.Worker.assignment:type_name -> ateapi.Assignment + 87, // 90: ateapi.Worker.labels:type_name -> ateapi.Worker.LabelsEntry + 8, // 91: ateapi.Worker.state:type_name -> ateapi.Worker.State + 76, // 92: ateapi.Assignment.actor_template:type_name -> ateapi.KubeNamespacedObjectRef + 18, // 93: ateapi.Assignment.actor:type_name -> ateapi.ObjectRef + 4, // 94: ateapi.MintCertRequest.purpose:type_name -> ateapi.ActorCertificatePurpose + 36, // 95: ateapi.SandboxAssets.AssetsEntry.value:type_name -> ateapi.ArchAssets + 37, // 96: ateapi.ArchAssets.FilesEntry.value:type_name -> ateapi.AssetFile + 54, // 97: ateapi.Control.GetActor:input_type -> ateapi.GetActorRequest + 55, // 98: ateapi.Control.CreateActor:input_type -> ateapi.CreateActorRequest + 56, // 99: ateapi.Control.UpdateActor:input_type -> ateapi.UpdateActorRequest + 57, // 100: ateapi.Control.SuspendActor:input_type -> ateapi.SuspendActorRequest + 59, // 101: ateapi.Control.PauseActor:input_type -> ateapi.PauseActorRequest + 61, // 102: ateapi.Control.ResumeActor:input_type -> ateapi.ResumeActorRequest + 63, // 103: ateapi.Control.DeleteActor:input_type -> ateapi.DeleteActorRequest + 64, // 104: ateapi.Control.GetActorSnapshot:input_type -> ateapi.GetActorSnapshotRequest + 65, // 105: ateapi.Control.ListActorSnapshots:input_type -> ateapi.ListActorSnapshotsRequest + 67, // 106: ateapi.Control.TagActorSnapshot:input_type -> ateapi.TagActorSnapshotRequest + 68, // 107: ateapi.Control.UpdateActorSnapshotTag:input_type -> ateapi.UpdateActorSnapshotTagRequest + 69, // 108: ateapi.Control.DeleteActorSnapshotTag:input_type -> ateapi.DeleteActorSnapshotTagRequest + 70, // 109: ateapi.Control.ListWorkers:input_type -> ateapi.ListWorkersRequest + 72, // 110: ateapi.Control.ListActors:input_type -> ateapi.ListActorsRequest + 38, // 111: ateapi.Control.CreateAtespace:input_type -> ateapi.CreateAtespaceRequest + 39, // 112: ateapi.Control.GetAtespace:input_type -> ateapi.GetAtespaceRequest + 40, // 113: ateapi.Control.ListAtespaces:input_type -> ateapi.ListAtespacesRequest + 42, // 114: ateapi.Control.DeleteAtespace:input_type -> ateapi.DeleteAtespaceRequest + 43, // 115: ateapi.Control.CreateActorTemplate:input_type -> ateapi.CreateActorTemplateRequest + 44, // 116: ateapi.Control.GetActorTemplate:input_type -> ateapi.GetActorTemplateRequest + 45, // 117: ateapi.Control.UpdateActorTemplate:input_type -> ateapi.UpdateActorTemplateRequest + 46, // 118: ateapi.Control.ListActorTemplates:input_type -> ateapi.ListActorTemplatesRequest + 48, // 119: ateapi.Control.DeleteActorTemplate:input_type -> ateapi.DeleteActorTemplateRequest + 49, // 120: ateapi.Control.CreateActorTemplateVersion:input_type -> ateapi.CreateActorTemplateVersionRequest + 50, // 121: ateapi.Control.GetActorTemplateVersion:input_type -> ateapi.GetActorTemplateVersionRequest + 51, // 122: ateapi.Control.ListActorTemplateVersions:input_type -> ateapi.ListActorTemplateVersionsRequest + 53, // 123: ateapi.Control.DeleteActorTemplateVersion:input_type -> ateapi.DeleteActorTemplateVersionRequest + 77, // 124: ateapi.Debug.DebugClear:input_type -> ateapi.DebugClearRequest + 79, // 125: ateapi.ActorIdentity.MintJWT:input_type -> ateapi.MintJWTRequest + 81, // 126: ateapi.ActorIdentity.MintCert:input_type -> ateapi.MintCertRequest + 13, // 127: ateapi.Control.GetActor:output_type -> ateapi.Actor + 13, // 128: ateapi.Control.CreateActor:output_type -> ateapi.Actor + 13, // 129: ateapi.Control.UpdateActor:output_type -> ateapi.Actor + 58, // 130: ateapi.Control.SuspendActor:output_type -> ateapi.SuspendActorResponse + 60, // 131: ateapi.Control.PauseActor:output_type -> ateapi.PauseActorResponse + 62, // 132: ateapi.Control.ResumeActor:output_type -> ateapi.ResumeActorResponse + 13, // 133: ateapi.Control.DeleteActor:output_type -> ateapi.Actor + 15, // 134: ateapi.Control.GetActorSnapshot:output_type -> ateapi.ActorSnapshot + 66, // 135: ateapi.Control.ListActorSnapshots:output_type -> ateapi.ListActorSnapshotsResponse + 16, // 136: ateapi.Control.TagActorSnapshot:output_type -> ateapi.ActorSnapshotTag + 16, // 137: ateapi.Control.UpdateActorSnapshotTag:output_type -> ateapi.ActorSnapshotTag + 16, // 138: ateapi.Control.DeleteActorSnapshotTag:output_type -> ateapi.ActorSnapshotTag + 71, // 139: ateapi.Control.ListWorkers:output_type -> ateapi.ListWorkersResponse + 73, // 140: ateapi.Control.ListActors:output_type -> ateapi.ListActorsResponse + 17, // 141: ateapi.Control.CreateAtespace:output_type -> ateapi.Atespace + 17, // 142: ateapi.Control.GetAtespace:output_type -> ateapi.Atespace + 41, // 143: ateapi.Control.ListAtespaces:output_type -> ateapi.ListAtespacesResponse + 17, // 144: ateapi.Control.DeleteAtespace:output_type -> ateapi.Atespace + 21, // 145: ateapi.Control.CreateActorTemplate:output_type -> ateapi.ActorTemplate + 21, // 146: ateapi.Control.GetActorTemplate:output_type -> ateapi.ActorTemplate + 21, // 147: ateapi.Control.UpdateActorTemplate:output_type -> ateapi.ActorTemplate + 47, // 148: ateapi.Control.ListActorTemplates:output_type -> ateapi.ListActorTemplatesResponse + 21, // 149: ateapi.Control.DeleteActorTemplate:output_type -> ateapi.ActorTemplate + 22, // 150: ateapi.Control.CreateActorTemplateVersion:output_type -> ateapi.ActorTemplateVersion + 22, // 151: ateapi.Control.GetActorTemplateVersion:output_type -> ateapi.ActorTemplateVersion + 52, // 152: ateapi.Control.ListActorTemplateVersions:output_type -> ateapi.ListActorTemplateVersionsResponse + 22, // 153: ateapi.Control.DeleteActorTemplateVersion:output_type -> ateapi.ActorTemplateVersion + 78, // 154: ateapi.Debug.DebugClear:output_type -> ateapi.DebugClearResponse + 80, // 155: ateapi.ActorIdentity.MintJWT:output_type -> ateapi.MintJWTResponse + 82, // 156: ateapi.ActorIdentity.MintCert:output_type -> ateapi.MintCertResponse + 127, // [127:157] is the sub-list for method output_type + 97, // [97:127] is the sub-list for method input_type + 97, // [97:97] is the sub-list for extension type_name + 97, // [97:97] is the sub-list for extension extendee + 0, // [0:97] is the sub-list for field type_name } func init() { file_ateapi_proto_init() } @@ -3529,13 +5750,24 @@ func file_ateapi_proto_init() { (*ActorSnapshotRef_Snapshot)(nil), (*ActorSnapshotRef_Tag)(nil), } + file_ateapi_proto_msgTypes[11].OneofWrappers = []any{ + (*ActorTemplateRef_ActorTemplateVersion)(nil), + (*ActorTemplateRef_ActorTemplate)(nil), + } + file_ateapi_proto_msgTypes[19].OneofWrappers = []any{ + (*EnvVar_Value)(nil), + } + file_ateapi_proto_msgTypes[22].OneofWrappers = []any{ + (*Volume_DurableDir)(nil), + (*Volume_ExternalVolumeTemplate)(nil), + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_ateapi_proto_rawDesc), len(file_ateapi_proto_rawDesc)), - NumEnums: 6, - NumMessages: 48, + NumEnums: 9, + NumMessages: 79, NumExtensions: 0, NumServices: 3, }, diff --git a/pkg/proto/ateapipb/ateapi.proto b/pkg/proto/ateapipb/ateapi.proto index 1ee06ddea..edaa0b500 100644 --- a/pkg/proto/ateapipb/ateapi.proto +++ b/pkg/proto/ateapipb/ateapi.proto @@ -80,6 +80,36 @@ service Control { // Delete an empty Atespace. Rejects (FailedPrecondition) if any Actors or // ActorSnapshotTags remain. rpc DeleteAtespace(DeleteAtespaceRequest) returns (Atespace) {} + + rpc CreateActorTemplate(CreateActorTemplateRequest) returns (ActorTemplate) {} + + // Get an ActorTemplate by name. + rpc GetActorTemplate(GetActorTemplateRequest) returns (ActorTemplate) {} + + // Update mutable fields on an existing ActorTemplate. + rpc UpdateActorTemplate(UpdateActorTemplateRequest) returns (ActorTemplate) {} + + rpc ListActorTemplates(ListActorTemplatesRequest) returns (ListActorTemplatesResponse) {} + + // Delete an ActorTemplate. Rejects (FailedPrecondition) while any of its + // ActorTemplateVersions exist. + rpc DeleteActorTemplate(DeleteActorTemplateRequest) returns (ActorTemplate) {} + + // Create a new ActorTemplateVersion under an existing ActorTemplate + // (FailedPrecondition if the parent does not exist). + rpc CreateActorTemplateVersion(CreateActorTemplateVersionRequest) returns (ActorTemplateVersion) {} + + // Get an ActorTemplateVersion by name. + rpc GetActorTemplateVersion(GetActorTemplateVersionRequest) returns (ActorTemplateVersion) {} + + // List ActorTemplateVersions, optionally filtered to one ActorTemplate. + rpc ListActorTemplateVersions(ListActorTemplateVersionsRequest) returns (ListActorTemplateVersionsResponse) {} + + // Delete an ActorTemplateVersion together with its golden actor and golden + // snapshot in the reserved ate-golden atespace. Rejects (FailedPrecondition) + // while the version is its parent's default_version_on_create or while any + // Actor pins it. + rpc DeleteActorTemplateVersion(DeleteActorTemplateVersionRequest) returns (ActorTemplateVersion) {} } message LocalSnapshotInfo { @@ -169,9 +199,12 @@ message Actor { // Common resource metadata: atespace, name, uid, version, timestamps. ResourceMetadata metadata = 1; + // TODO: delete both fields once we start using actor_template_version below. string actor_template_namespace = 2; string actor_template_name = 3; + ObjectRef actor_template_version = 13; + enum Status { STATUS_UNSPECIFIED = 0; STATUS_RESUMING = 1; @@ -243,6 +276,8 @@ message ActorSnapshot { string actor_template_uid = 7; SnapshotContentScope content_scope = 8; string snapshot_uri = 9; + // Immutable reference to the actor_template_version where the snapshot was created from. + ObjectRef actor_template_version = 10; } // ActorSnapshotTag is an immutable, Atespace-owned alias and retention pin. @@ -278,6 +313,267 @@ message ActorSnapshotRef { } } +// SandboxClass selects the sandbox runtime family. Snapshots are not portable +// across classes. +enum SandboxClass { + SANDBOX_CLASS_UNSPECIFIED = 0; + SANDBOX_CLASS_GVISOR = 1; + SANDBOX_CLASS_MICROVM = 2; +} + +// ActorTemplateRef addresses a template by its canonical identity or by an +// Atespace-owned ActorTemplateVersion. +message ActorTemplateRef { + oneof reference { + ObjectRef actor_template_version = 1; + ObjectRef actor_template = 2; + } +} + +// ActorTemplate an mutable, Atespace-owned resource that points to a default +// ActorTemplateVersion to be used when creating Actors. +message ActorTemplate { + // Common resource metadata: atespace, name, uid, version, timestamps. + ResourceMetadata metadata = 1; + + // default_version_on_create names the ActorTemplateVersion used by + // CreateActor calls that do not pin a version. If unset, CreateActor + // without an explicit version fails with FailedPrecondition. + ObjectRef default_version_on_create = 3; + + // TODO: A "scope" field could be useful to allow global ActorTemplateVersion. +} + +// ActorTemplateVersion is one immutable released version of an ActorTemplate: +// the workload definition plus everything that affects snapshot validity. +// The workload definition (pause_image through sandbox_config) is immutable +// after creation; golden_snapshot, state, resolved_sandbox and message are +// server-owned status fields. +// ActorTemplateVersion is Atespaced. +message ActorTemplateVersion { + // Common resource metadata: atespace, name, uid, version, timestamps. + ResourceMetadata metadata = 1; + + // actor_template is the parent ActorTemplate. Required at creation and + // immutable. + ObjectRef actor_template = 2; + + // worker_selector restricts which worker pools actors from this template + // may use. + Selector worker_selector = 3; + + repeated Container containers = 4; + + repeated Volume volumes = 5; + + SnapshotsConfig snapshots_config = 6; + + // sandbox_config selects the sandbox runtime this version's actors run on. + // Required. Resolved and frozen into resolved_sandbox at creation time. + SandboxConfig sandbox_config = 7; + + // golden_snapshot points at the ActorSnapshot, in the reserved ate-golden + // system atespace, built for this version by ate-api. Set once state is + // READY. + ObjectRef golden_snapshot = 8; + + // State machine, mirroring the ActorTemplateVersion CRD PhaseType: + // INITIAL -> RESUME_GOLDEN_ACTOR -> WAIT_GOLDEN_ACTOR -> {READY | FAILED}. + // READY and FAILED are terminal; the version is only usable once READY. + ActorTemplateVersionPhase phase = 9; + + // TODO: cpu class will be specified here in the future. +} + +message ActorTemplateVersionPhase { + enum Phase { + PHASE_UNSPECIFIED = 0; + PHASE_INITIAL = 1; + PHASE_RESUME_GOLDEN_ACTOR = 2; + PHASE_WAIT_GOLDEN_ACTOR = 3; + PHASE_READY = 4; + PHASE_FAILED = 5; + } + Phase phase = 1; + + // message is a human-readable explanation of the current state, most + // useful when the ActorTemplateVersion is FAILED. + string message = 2; +} + +// SandboxConfig selects the sandbox runtime for an ActorTemplateVersion. +message SandboxConfig { + // sandbox_class selects the sandbox runtime family. + // Required; must be specified.. + SandboxClass sandbox_class = 1; + + // config_name names the cluster-scoped SandboxConfig Kubernetes object + // supplying the sandbox binaries. Required; must match sandbox_class. + string config_name = 2; + + // sandbox_assets is the referenced SandboxConfig's content frozen at + // creation time. + SandboxAssets sandbox_assets = 3; + + // pause_image is the container to use as the root sandbox container. + string pause_image = 4; +} + +message SnapshotsConfig { + // on_pause selects what is captured during pause actor. + SnapshotContentScope on_pause = 1; + + // on_commit selects what captures. + // Must be a subset of on_pause: FULL allows FULL or DATA, DATA allows DATA. + SnapshotContentScope on_commit = 2; + + // on_resume selects, per snapshot situation, what supplies the guest state + // at resume. Unset means the defaults documented on OnResumeConfig. + OnResumeConfig on_resume = 3; + + // storage_location is the base object-storage URI snapshots of actors on + // this version are stored under. Required. + string storage_location = 4; +} + +// ResumeSource selects what supplies the guest state when an actor is resumed +// from one of the snapshot situations named by OnResumeConfig's fields. +enum ResumeSource { + RESUME_SOURCE_UNSPECIFIED = 0; + // Starts the actor's containers afresh from the OCI image, with the + // durable-dir volumes pre-populated from the snapshot. + RESUME_SOURCE_COLD_BOOT = 1; + // Restores with the version's golden snapshot and the actor's own + // durable data. + RESUME_SOURCE_GOLDEN = 2; +} + +// OnResumeConfig selects, per snapshot situation, what supplies the guest +// state at resume. Each field names what is being resumed FROM; the value +// names the boot source. Full snapshots that are still valid always restore +// from their own content and are not configurable here. +message OnResumeConfig { + // from_data applies when the resume uses a DATA-scope snapshot (from + // on_pause or on_commit). + ResumeSource from_data = 1; +} + +// Container is a single application container of an ActorTemplateVersion. +message Container { + string name = 1; + + string image = 2; + + // Entrypoint array; when set, the image's ENTRYPOINT and CMD are both + // ignored and the process argv is command + args. Unlike Kubernetes, + // $(VAR_NAME) references are NOT expanded. + repeated string command = 3; + + // Arguments to the entrypoint; the image's CMD is used if unset (unless + // command is set, which discards the image's CMD). + repeated string args = 4; + + repeated EnvVar env = 5; + + // readyz is an optional HTTP readiness probe; when set the actor is not + // ready until the endpoint returns 200. + ContainerReadyz readyz = 6; + + repeated VolumeMount volume_mounts = 7; +} + +// EnvVar supplies one environment variable to a container. Values are not +// expanded with Kubernetes-style $(VAR) references. +message EnvVar { + // name may be any printable ASCII character except '='. + string name = 1; + + // Exactly one source must be set. + oneof source { + // Literal value. + string value = 2; + } +} + +// ContainerReadyz configures the readiness signal for a container. +message ContainerReadyz { + // http_get specifies the HTTP request to perform. Required. + HTTPGetAction http_get = 1; + + // timeout_seconds bounds how long to poll http_get before failing the + // actor start. 0 means the server-applied default (30s). + int32 timeout_seconds = 2; +} + +// HTTPGetAction describes an HTTP GET against the container's interior IP. +message HTTPGetAction { + // path defaults to "/readyz". + string path = 1; + + int32 port = 2; +} + +message Volume { + // name of the volume. Must be a DNS label. + string name = 1; + + // Exactly one source must be set. + oneof source { + DurableDirVolumeSource durable_dir = 2; + ExternalVolumeTemplate external_volume_template = 3; + } +} + +// DurableDirVolumeSource is a durable directory on rootfs that persists +// across resumes and participates in snapshots. +message DurableDirVolumeSource {} + +// ExternalVolumeTemplate provisions an external volume per actor; the volume +// lives only as long as the actor. Not supported with SANDBOX_CLASS_MICROVM. +message ExternalVolumeTemplate { + // capacity of the volume to create, in Kubernetes resource.Quantity string + // form (e.g. "10Gi"). Required. + string capacity = 1; + + // storage_class_name names the cluster-scoped Kubernetes StorageClass to + // create the volume from. Required. + string storage_class_name = 2; +} + +// VolumeMount mounts a named Volume into a container. +message VolumeMount { + // name must match the name of a Volume. + string name = 1; + + // mount_path within the container. Must be a clean absolute Unix path. + string mount_path = 2; +} + +// SandboxAssets is the frozen description of the sandbox binaries an actor +// boots with: a class plus content-addressed files keyed first by +// architecture and then by asset name, mirroring the SandboxConfig +// CRD schema. +message SandboxAssets { + SandboxClass sandbox_class = 1; + // assets maps architecture (GOARCH, e.g. "amd64") to that arch's files. + map assets = 2; +} + +message ArchAssets { + // files maps asset name (e.g. "gvisor", "kata-kernel") to its file. + map files = 1; +} + +// AssetFile is one content-addressed file atelet fetches for a sandbox +// runtime. +message AssetFile { + // URL to download the asset from (e.g. a gs:// URL). + string url = 1; + + // Lower-case hex SHA256 naming the cached file and verifying the download. + string sha256 = 2; +} + message CreateAtespaceRequest { // The atespace to create. Atespace atespace = 1; @@ -310,6 +606,102 @@ message DeleteAtespaceRequest { ObjectRef atespace = 1; } +message CreateActorTemplateRequest { + // The actor template to create. Server-assigned metadata (uid, version, + // timestamps) is ignored. + ActorTemplate actor_template = 1; +} + +message GetActorTemplateRequest { + ObjectRef actor_template = 1; +} + +// Request to update mutable fields on an existing ActorTemplate. +message UpdateActorTemplateRequest { + // The actor template to update. + // actor_template.metadata.name identifies which resource to update. + // actor_template.metadata.version and actor_template.metadata.uid are + // optional preconditions and zero values skip the check. + ActorTemplate actor_template = 1; + + // The set of fields to update. Required. + // + // Only the following fields are supported: + // - default_version_on_create + google.protobuf.FieldMask update_mask = 2; +} + +message ListActorTemplatesRequest { + // The atespace to list actor templates from. Empty lists across all + // atespaces. + string atespace = 1; + + // Requested page size; the server may return fewer, or occasionally + // slightly more. If unspecified, defaults to a server-chosen value; + // values above 1000 are coerced to 1000. + int32 page_size = 2; + + // Pagination token from a previous ListActorTemplates response. + // Omit or leave empty for the first request. + string page_token = 3; +} + +message ListActorTemplatesResponse { + // The page of actor templates. This list may be empty even if there are + // more results. + repeated ActorTemplate actor_templates = 1; + + // Pagination token for the next page. Empty if this is the last page. + string next_page_token = 2; +} + +message DeleteActorTemplateRequest { + ObjectRef actor_template = 1; +} + +message CreateActorTemplateVersionRequest { + // The actor template version to create. Server-assigned metadata (uid, + // version, timestamps) is ignored, as are the status fields: the server + // initializes new versions to STATE_INITIAL. + ActorTemplateVersion actor_template_version = 1; +} + +message GetActorTemplateVersionRequest { + ObjectRef actor_template_version = 1; +} + +message ListActorTemplateVersionsRequest { + // The parent ActorTemplate whose versions to list. An unset ref lists + // versions across all templates. + ObjectRef actor_template = 1; + + // The atespace to list actor templates from. Empty lists across all + // atespaces. + string atespace = 2; + + // Requested page size; the server may return fewer, or occasionally + // slightly more. If unspecified, defaults to a server-chosen value; + // values above 1000 are coerced to 1000. + int32 page_size = 3; + + // Pagination token from a previous ListActorTemplateVersions response. + // Omit or leave empty for the first request. + string page_token = 4; +} + +message ListActorTemplateVersionsResponse { + // The page of actor template versions. This list may be empty even if + // there are more results. + repeated ActorTemplateVersion actor_template_versions = 1; + + // Pagination token for the next page. Empty if this is the last page. + string next_page_token = 2; +} + +message DeleteActorTemplateVersionRequest { + ObjectRef actor_template_version = 1; +} + message GetActorRequest { ObjectRef actor = 1; } diff --git a/pkg/proto/ateapipb/ateapi_grpc.pb.go b/pkg/proto/ateapipb/ateapi_grpc.pb.go index ba01c0194..aa648e231 100644 --- a/pkg/proto/ateapipb/ateapi_grpc.pb.go +++ b/pkg/proto/ateapipb/ateapi_grpc.pb.go @@ -33,24 +33,33 @@ import ( const _ = grpc.SupportPackageIsVersion9 const ( - Control_GetActor_FullMethodName = "/ateapi.Control/GetActor" - Control_CreateActor_FullMethodName = "/ateapi.Control/CreateActor" - Control_UpdateActor_FullMethodName = "/ateapi.Control/UpdateActor" - Control_SuspendActor_FullMethodName = "/ateapi.Control/SuspendActor" - Control_PauseActor_FullMethodName = "/ateapi.Control/PauseActor" - Control_ResumeActor_FullMethodName = "/ateapi.Control/ResumeActor" - Control_DeleteActor_FullMethodName = "/ateapi.Control/DeleteActor" - Control_GetActorSnapshot_FullMethodName = "/ateapi.Control/GetActorSnapshot" - Control_ListActorSnapshots_FullMethodName = "/ateapi.Control/ListActorSnapshots" - Control_TagActorSnapshot_FullMethodName = "/ateapi.Control/TagActorSnapshot" - Control_UpdateActorSnapshotTag_FullMethodName = "/ateapi.Control/UpdateActorSnapshotTag" - Control_DeleteActorSnapshotTag_FullMethodName = "/ateapi.Control/DeleteActorSnapshotTag" - Control_ListWorkers_FullMethodName = "/ateapi.Control/ListWorkers" - Control_ListActors_FullMethodName = "/ateapi.Control/ListActors" - Control_CreateAtespace_FullMethodName = "/ateapi.Control/CreateAtespace" - Control_GetAtespace_FullMethodName = "/ateapi.Control/GetAtespace" - Control_ListAtespaces_FullMethodName = "/ateapi.Control/ListAtespaces" - Control_DeleteAtespace_FullMethodName = "/ateapi.Control/DeleteAtespace" + Control_GetActor_FullMethodName = "/ateapi.Control/GetActor" + Control_CreateActor_FullMethodName = "/ateapi.Control/CreateActor" + Control_UpdateActor_FullMethodName = "/ateapi.Control/UpdateActor" + Control_SuspendActor_FullMethodName = "/ateapi.Control/SuspendActor" + Control_PauseActor_FullMethodName = "/ateapi.Control/PauseActor" + Control_ResumeActor_FullMethodName = "/ateapi.Control/ResumeActor" + Control_DeleteActor_FullMethodName = "/ateapi.Control/DeleteActor" + Control_GetActorSnapshot_FullMethodName = "/ateapi.Control/GetActorSnapshot" + Control_ListActorSnapshots_FullMethodName = "/ateapi.Control/ListActorSnapshots" + Control_TagActorSnapshot_FullMethodName = "/ateapi.Control/TagActorSnapshot" + Control_UpdateActorSnapshotTag_FullMethodName = "/ateapi.Control/UpdateActorSnapshotTag" + Control_DeleteActorSnapshotTag_FullMethodName = "/ateapi.Control/DeleteActorSnapshotTag" + Control_ListWorkers_FullMethodName = "/ateapi.Control/ListWorkers" + Control_ListActors_FullMethodName = "/ateapi.Control/ListActors" + Control_CreateAtespace_FullMethodName = "/ateapi.Control/CreateAtespace" + Control_GetAtespace_FullMethodName = "/ateapi.Control/GetAtespace" + Control_ListAtespaces_FullMethodName = "/ateapi.Control/ListAtespaces" + Control_DeleteAtespace_FullMethodName = "/ateapi.Control/DeleteAtespace" + Control_CreateActorTemplate_FullMethodName = "/ateapi.Control/CreateActorTemplate" + Control_GetActorTemplate_FullMethodName = "/ateapi.Control/GetActorTemplate" + Control_UpdateActorTemplate_FullMethodName = "/ateapi.Control/UpdateActorTemplate" + Control_ListActorTemplates_FullMethodName = "/ateapi.Control/ListActorTemplates" + Control_DeleteActorTemplate_FullMethodName = "/ateapi.Control/DeleteActorTemplate" + Control_CreateActorTemplateVersion_FullMethodName = "/ateapi.Control/CreateActorTemplateVersion" + Control_GetActorTemplateVersion_FullMethodName = "/ateapi.Control/GetActorTemplateVersion" + Control_ListActorTemplateVersions_FullMethodName = "/ateapi.Control/ListActorTemplateVersions" + Control_DeleteActorTemplateVersion_FullMethodName = "/ateapi.Control/DeleteActorTemplateVersion" ) // ControlClient is the client API for Control service. @@ -99,6 +108,27 @@ type ControlClient interface { // Delete an empty Atespace. Rejects (FailedPrecondition) if any Actors or // ActorSnapshotTags remain. DeleteAtespace(ctx context.Context, in *DeleteAtespaceRequest, opts ...grpc.CallOption) (*Atespace, error) + CreateActorTemplate(ctx context.Context, in *CreateActorTemplateRequest, opts ...grpc.CallOption) (*ActorTemplate, error) + // Get an ActorTemplate by name. + GetActorTemplate(ctx context.Context, in *GetActorTemplateRequest, opts ...grpc.CallOption) (*ActorTemplate, error) + // Update mutable fields on an existing ActorTemplate. + UpdateActorTemplate(ctx context.Context, in *UpdateActorTemplateRequest, opts ...grpc.CallOption) (*ActorTemplate, error) + ListActorTemplates(ctx context.Context, in *ListActorTemplatesRequest, opts ...grpc.CallOption) (*ListActorTemplatesResponse, error) + // Delete an ActorTemplate. Rejects (FailedPrecondition) while any of its + // ActorTemplateVersions exist. + DeleteActorTemplate(ctx context.Context, in *DeleteActorTemplateRequest, opts ...grpc.CallOption) (*ActorTemplate, error) + // Create a new ActorTemplateVersion under an existing ActorTemplate + // (FailedPrecondition if the parent does not exist). + CreateActorTemplateVersion(ctx context.Context, in *CreateActorTemplateVersionRequest, opts ...grpc.CallOption) (*ActorTemplateVersion, error) + // Get an ActorTemplateVersion by name. + GetActorTemplateVersion(ctx context.Context, in *GetActorTemplateVersionRequest, opts ...grpc.CallOption) (*ActorTemplateVersion, error) + // List ActorTemplateVersions, optionally filtered to one ActorTemplate. + ListActorTemplateVersions(ctx context.Context, in *ListActorTemplateVersionsRequest, opts ...grpc.CallOption) (*ListActorTemplateVersionsResponse, error) + // Delete an ActorTemplateVersion together with its golden actor and golden + // snapshot in the reserved ate-golden atespace. Rejects (FailedPrecondition) + // while the version is its parent's default_version_on_create or while any + // Actor pins it. + DeleteActorTemplateVersion(ctx context.Context, in *DeleteActorTemplateVersionRequest, opts ...grpc.CallOption) (*ActorTemplateVersion, error) } type controlClient struct { @@ -289,6 +319,96 @@ func (c *controlClient) DeleteAtespace(ctx context.Context, in *DeleteAtespaceRe return out, nil } +func (c *controlClient) CreateActorTemplate(ctx context.Context, in *CreateActorTemplateRequest, opts ...grpc.CallOption) (*ActorTemplate, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ActorTemplate) + err := c.cc.Invoke(ctx, Control_CreateActorTemplate_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *controlClient) GetActorTemplate(ctx context.Context, in *GetActorTemplateRequest, opts ...grpc.CallOption) (*ActorTemplate, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ActorTemplate) + err := c.cc.Invoke(ctx, Control_GetActorTemplate_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *controlClient) UpdateActorTemplate(ctx context.Context, in *UpdateActorTemplateRequest, opts ...grpc.CallOption) (*ActorTemplate, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ActorTemplate) + err := c.cc.Invoke(ctx, Control_UpdateActorTemplate_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *controlClient) ListActorTemplates(ctx context.Context, in *ListActorTemplatesRequest, opts ...grpc.CallOption) (*ListActorTemplatesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListActorTemplatesResponse) + err := c.cc.Invoke(ctx, Control_ListActorTemplates_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *controlClient) DeleteActorTemplate(ctx context.Context, in *DeleteActorTemplateRequest, opts ...grpc.CallOption) (*ActorTemplate, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ActorTemplate) + err := c.cc.Invoke(ctx, Control_DeleteActorTemplate_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *controlClient) CreateActorTemplateVersion(ctx context.Context, in *CreateActorTemplateVersionRequest, opts ...grpc.CallOption) (*ActorTemplateVersion, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ActorTemplateVersion) + err := c.cc.Invoke(ctx, Control_CreateActorTemplateVersion_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *controlClient) GetActorTemplateVersion(ctx context.Context, in *GetActorTemplateVersionRequest, opts ...grpc.CallOption) (*ActorTemplateVersion, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ActorTemplateVersion) + err := c.cc.Invoke(ctx, Control_GetActorTemplateVersion_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *controlClient) ListActorTemplateVersions(ctx context.Context, in *ListActorTemplateVersionsRequest, opts ...grpc.CallOption) (*ListActorTemplateVersionsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListActorTemplateVersionsResponse) + err := c.cc.Invoke(ctx, Control_ListActorTemplateVersions_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *controlClient) DeleteActorTemplateVersion(ctx context.Context, in *DeleteActorTemplateVersionRequest, opts ...grpc.CallOption) (*ActorTemplateVersion, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ActorTemplateVersion) + err := c.cc.Invoke(ctx, Control_DeleteActorTemplateVersion_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + // ControlServer is the server API for Control service. // All implementations must embed UnimplementedControlServer // for forward compatibility. @@ -335,6 +455,27 @@ type ControlServer interface { // Delete an empty Atespace. Rejects (FailedPrecondition) if any Actors or // ActorSnapshotTags remain. DeleteAtespace(context.Context, *DeleteAtespaceRequest) (*Atespace, error) + CreateActorTemplate(context.Context, *CreateActorTemplateRequest) (*ActorTemplate, error) + // Get an ActorTemplate by name. + GetActorTemplate(context.Context, *GetActorTemplateRequest) (*ActorTemplate, error) + // Update mutable fields on an existing ActorTemplate. + UpdateActorTemplate(context.Context, *UpdateActorTemplateRequest) (*ActorTemplate, error) + ListActorTemplates(context.Context, *ListActorTemplatesRequest) (*ListActorTemplatesResponse, error) + // Delete an ActorTemplate. Rejects (FailedPrecondition) while any of its + // ActorTemplateVersions exist. + DeleteActorTemplate(context.Context, *DeleteActorTemplateRequest) (*ActorTemplate, error) + // Create a new ActorTemplateVersion under an existing ActorTemplate + // (FailedPrecondition if the parent does not exist). + CreateActorTemplateVersion(context.Context, *CreateActorTemplateVersionRequest) (*ActorTemplateVersion, error) + // Get an ActorTemplateVersion by name. + GetActorTemplateVersion(context.Context, *GetActorTemplateVersionRequest) (*ActorTemplateVersion, error) + // List ActorTemplateVersions, optionally filtered to one ActorTemplate. + ListActorTemplateVersions(context.Context, *ListActorTemplateVersionsRequest) (*ListActorTemplateVersionsResponse, error) + // Delete an ActorTemplateVersion together with its golden actor and golden + // snapshot in the reserved ate-golden atespace. Rejects (FailedPrecondition) + // while the version is its parent's default_version_on_create or while any + // Actor pins it. + DeleteActorTemplateVersion(context.Context, *DeleteActorTemplateVersionRequest) (*ActorTemplateVersion, error) mustEmbedUnimplementedControlServer() } @@ -399,6 +540,33 @@ func (UnimplementedControlServer) ListAtespaces(context.Context, *ListAtespacesR func (UnimplementedControlServer) DeleteAtespace(context.Context, *DeleteAtespaceRequest) (*Atespace, error) { return nil, status.Error(codes.Unimplemented, "method DeleteAtespace not implemented") } +func (UnimplementedControlServer) CreateActorTemplate(context.Context, *CreateActorTemplateRequest) (*ActorTemplate, error) { + return nil, status.Error(codes.Unimplemented, "method CreateActorTemplate not implemented") +} +func (UnimplementedControlServer) GetActorTemplate(context.Context, *GetActorTemplateRequest) (*ActorTemplate, error) { + return nil, status.Error(codes.Unimplemented, "method GetActorTemplate not implemented") +} +func (UnimplementedControlServer) UpdateActorTemplate(context.Context, *UpdateActorTemplateRequest) (*ActorTemplate, error) { + return nil, status.Error(codes.Unimplemented, "method UpdateActorTemplate not implemented") +} +func (UnimplementedControlServer) ListActorTemplates(context.Context, *ListActorTemplatesRequest) (*ListActorTemplatesResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListActorTemplates not implemented") +} +func (UnimplementedControlServer) DeleteActorTemplate(context.Context, *DeleteActorTemplateRequest) (*ActorTemplate, error) { + return nil, status.Error(codes.Unimplemented, "method DeleteActorTemplate not implemented") +} +func (UnimplementedControlServer) CreateActorTemplateVersion(context.Context, *CreateActorTemplateVersionRequest) (*ActorTemplateVersion, error) { + return nil, status.Error(codes.Unimplemented, "method CreateActorTemplateVersion not implemented") +} +func (UnimplementedControlServer) GetActorTemplateVersion(context.Context, *GetActorTemplateVersionRequest) (*ActorTemplateVersion, error) { + return nil, status.Error(codes.Unimplemented, "method GetActorTemplateVersion not implemented") +} +func (UnimplementedControlServer) ListActorTemplateVersions(context.Context, *ListActorTemplateVersionsRequest) (*ListActorTemplateVersionsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListActorTemplateVersions not implemented") +} +func (UnimplementedControlServer) DeleteActorTemplateVersion(context.Context, *DeleteActorTemplateVersionRequest) (*ActorTemplateVersion, error) { + return nil, status.Error(codes.Unimplemented, "method DeleteActorTemplateVersion not implemented") +} func (UnimplementedControlServer) mustEmbedUnimplementedControlServer() {} func (UnimplementedControlServer) testEmbeddedByValue() {} @@ -744,6 +912,168 @@ func _Control_DeleteAtespace_Handler(srv interface{}, ctx context.Context, dec f return interceptor(ctx, in, info, handler) } +func _Control_CreateActorTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateActorTemplateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ControlServer).CreateActorTemplate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Control_CreateActorTemplate_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ControlServer).CreateActorTemplate(ctx, req.(*CreateActorTemplateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Control_GetActorTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetActorTemplateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ControlServer).GetActorTemplate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Control_GetActorTemplate_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ControlServer).GetActorTemplate(ctx, req.(*GetActorTemplateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Control_UpdateActorTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateActorTemplateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ControlServer).UpdateActorTemplate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Control_UpdateActorTemplate_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ControlServer).UpdateActorTemplate(ctx, req.(*UpdateActorTemplateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Control_ListActorTemplates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListActorTemplatesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ControlServer).ListActorTemplates(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Control_ListActorTemplates_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ControlServer).ListActorTemplates(ctx, req.(*ListActorTemplatesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Control_DeleteActorTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteActorTemplateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ControlServer).DeleteActorTemplate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Control_DeleteActorTemplate_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ControlServer).DeleteActorTemplate(ctx, req.(*DeleteActorTemplateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Control_CreateActorTemplateVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateActorTemplateVersionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ControlServer).CreateActorTemplateVersion(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Control_CreateActorTemplateVersion_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ControlServer).CreateActorTemplateVersion(ctx, req.(*CreateActorTemplateVersionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Control_GetActorTemplateVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetActorTemplateVersionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ControlServer).GetActorTemplateVersion(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Control_GetActorTemplateVersion_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ControlServer).GetActorTemplateVersion(ctx, req.(*GetActorTemplateVersionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Control_ListActorTemplateVersions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListActorTemplateVersionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ControlServer).ListActorTemplateVersions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Control_ListActorTemplateVersions_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ControlServer).ListActorTemplateVersions(ctx, req.(*ListActorTemplateVersionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Control_DeleteActorTemplateVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteActorTemplateVersionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ControlServer).DeleteActorTemplateVersion(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Control_DeleteActorTemplateVersion_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ControlServer).DeleteActorTemplateVersion(ctx, req.(*DeleteActorTemplateVersionRequest)) + } + return interceptor(ctx, in, info, handler) +} + // Control_ServiceDesc is the grpc.ServiceDesc for Control service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -823,6 +1153,42 @@ var Control_ServiceDesc = grpc.ServiceDesc{ MethodName: "DeleteAtespace", Handler: _Control_DeleteAtespace_Handler, }, + { + MethodName: "CreateActorTemplate", + Handler: _Control_CreateActorTemplate_Handler, + }, + { + MethodName: "GetActorTemplate", + Handler: _Control_GetActorTemplate_Handler, + }, + { + MethodName: "UpdateActorTemplate", + Handler: _Control_UpdateActorTemplate_Handler, + }, + { + MethodName: "ListActorTemplates", + Handler: _Control_ListActorTemplates_Handler, + }, + { + MethodName: "DeleteActorTemplate", + Handler: _Control_DeleteActorTemplate_Handler, + }, + { + MethodName: "CreateActorTemplateVersion", + Handler: _Control_CreateActorTemplateVersion_Handler, + }, + { + MethodName: "GetActorTemplateVersion", + Handler: _Control_GetActorTemplateVersion_Handler, + }, + { + MethodName: "ListActorTemplateVersions", + Handler: _Control_ListActorTemplateVersions_Handler, + }, + { + MethodName: "DeleteActorTemplateVersion", + Handler: _Control_DeleteActorTemplateVersion_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "ateapi.proto",