Versions in this module Expand all Collapse all v0 v0.13.0 Aug 4, 2026 Changes in this version + const DefaultLockTTL + var ErrLockHeld = errors.New("deployment lock held") + func CheckPhase(status Status, phase Phase) error + func LockID(appName string) entity.Id + func Transition(from, to Status) error + type BeginParams struct + AppName string + AppVersion string + ClusterID string + DeployedBy core_v1alpha.DeployedBy + GitInfo core_v1alpha.GitInfo + SourceDeploymentID string + type Holder struct + AcquiredAt time.Time + AppName string + DeploymentID string + ExpiresAt time.Time + Revision int64 + func HolderFrom(err error) (*Holder, bool) + func (h *Holder) Expired(now time.Time) bool + type LockHeldError struct + Holder *Holder + func (e *LockHeldError) Error() string + func (e *LockHeldError) Is(target error) bool + type Locks struct + func NewLocks(log *slog.Logger, eac *entityserver_v1alpha.EntityAccessClient, ...) *Locks + func (l *Locks) Acquire(ctx context.Context, appName, deploymentID string) (*Holder, error) + func (l *Locks) Blocking(ctx context.Context, appName string) (*Holder, error) + func (l *Locks) Get(ctx context.Context, appName string) (*Holder, error) + func (l *Locks) Release(ctx context.Context, appName, deploymentID string) error + type Phase string + const PhaseActivating + const PhaseBuilding + const PhasePreparing + const PhasePushing + func ParsePhase(s string) (Phase, error) + func (p Phase) String() string + func (p Phase) Valid() bool + type Query struct + AppName string + Limit int + Status Status + type Record struct + Deployment *core_v1alpha.Deployment + Entity *entityserver_v1alpha.Entity + Revision int64 + func (r *Record) AppVersion() string + func (r *Record) Status() Status + type Status string + const StatusActive + const StatusCancelled + const StatusFailed + const StatusInProgress + const StatusRolledBack + const StatusSucceeded + func ParseStatus(s string) (Status, error) + func (s Status) String() string + func (s Status) Terminal() bool + func (s Status) Valid() bool + type StatusLookup func(ctx context.Context, deploymentID string) (Status, error) + type Store struct + func NewStore(log *slog.Logger, eac *entityserver_v1alpha.EntityAccessClient) *Store + func (s *Store) Create(ctx context.Context, dep *core_v1alpha.Deployment) (*Record, error) + func (s *Store) Delete(ctx context.Context, deploymentID string) error + func (s *Store) Get(ctx context.Context, deploymentID string) (*Record, error) + func (s *Store) List(ctx context.Context, q Query) ([]*Record, error) + func (s *Store) MarkPreviousActiveAs(ctx context.Context, appName, exceptID string, target Status) error + func (s *Store) Put(ctx context.Context, rec *Record) error + func (s *Store) Status(ctx context.Context, deploymentID string) (Status, error) + type Tracker struct + func NewTracker(log *slog.Logger, eac *entityserver_v1alpha.EntityAccessClient) *Tracker + func (t *Tracker) Activate(ctx context.Context, deploymentID string) error + func (t *Tracker) ActivateRollback(ctx context.Context, deploymentID string) error + func (t *Tracker) Begin(ctx context.Context, params BeginParams) (*Record, error) + func (t *Tracker) Cancel(ctx context.Context, deploymentID, reason string) error + func (t *Tracker) Fail(ctx context.Context, deploymentID, errorMessage, buildLogs string) error + func (t *Tracker) FailIfUnsettled(ctx context.Context, deploymentID, errorMessage, buildLogs string) error + func (t *Tracker) Locks() *Locks + func (t *Tracker) ReleaseLock(ctx context.Context, deploymentID string) error + func (t *Tracker) SetAppVersion(ctx context.Context, deploymentID, appVersionID string) error + func (t *Tracker) SetPhase(ctx context.Context, deploymentID string, phase Phase) error + func (t *Tracker) Store() *Store