Documentation
¶
Index ¶
- func Migrate(ctx context.Context, database *sql.DB) error
- func OpenDatabase(ctx context.Context, databaseURL string, ...) (*sql.DB, error)
- type Repository
- func (r *Repository) AdmitSkillPreparation(ctx context.Context, input skillset.PrepareRequest) (skillset.PreparationReceipt, error)
- func (r *Repository) AppendObservation(ctx context.Context, epoch repository.ObservationEpoch, ...) (deployment.Observation, error)
- func (r *Repository) BeginTransition(ctx context.Context, candidate deployment.Operation) (deployment.Operation, bool, error)
- func (r *Repository) CheckpointSkillPackage(ctx context.Context, setID int64, worker string, skill skillset.FrozenSkill, ...) error
- func (r *Repository) ClaimSkillCleanup(ctx context.Context, scope, worker string, now time.Time, lease time.Duration) (*skillset.CleanupJob, error)
- func (r *Repository) ClaimSkillPreparation(ctx context.Context, scope, worker string, now time.Time, lease time.Duration, ...) (*skillset.PreparationJob, error)
- func (r *Repository) CompleteOperation(ctx context.Context, operation deployment.Operation, ...) (*deployment.Observation, error)
- func (r *Repository) CompleteSkillCleanup(ctx context.Context, setID int64, worker string, now time.Time) error
- func (r *Repository) CompleteSkillPreparation(ctx context.Context, setID int64, worker, manifestDigest string, now time.Time) error
- func (r *Repository) FindRegistration(ctx context.Context, scope, member, incarnation string) (*acpincarnation.Record, error)
- func (r *Repository) GenerationClaim(ctx context.Context, key deployment.Key) (repository.GenerationClaim, error)
- func (r *Repository) GenerationOperation(ctx context.Context, key deployment.Key) (deployment.Operation, error)
- func (r *Repository) GetEnvironment(ctx context.Context, agentID string) (deployment.Environment, error)
- func (r *Repository) GetOperation(ctx context.Context, requestID string) (deployment.Operation, error)
- func (r *Repository) GetRegistration(ctx context.Context, scope, id string) (*acpincarnation.Record, error)
- func (r *Repository) GetSkillPreparation(ctx context.Context, scope, organizationID, agentID, requestID string) (skillset.PreparationReceipt, error)
- func (r *Repository) ListEnvironments(ctx context.Context) (result []deployment.Environment, resultErr error)
- func (r *Repository) ListObservations(ctx context.Context, after uint64, limit int) (deployment.ObservationWindow, error)
- func (r *Repository) ListenObservationNotifications(ctx context.Context, ready func(), notify func(string)) (resultErr error)
- func (r *Repository) MarkDriftedReadySkillVolume(ctx context.Context, prepared skillset.PreparedMaterialization) error
- func (r *Repository) MaxClaimedGeneration(ctx context.Context, agentID string) (uint64, error)
- func (r *Repository) ObservationMonitorReady(ctx context.Context) (ready bool, resultErr error)
- func (r *Repository) PostponeSkillCleanup(ctx context.Context, setID int64, worker string, now time.Time, ...) error
- func (r *Repository) ProbeObservationJournal(ctx context.Context) error
- func (r *Repository) ProbeObservationNotification(ctx context.Context, payload string) error
- func (r *Repository) PruneObservationBatch(ctx context.Context, epoch repository.ObservationEpoch) (int64, error)
- func (r *Repository) ReadRegistrationHistory(ctx context.Context, scope, member string, ...) (acpincarnation.HistoryPage, error)
- func (r *Repository) Ready(ctx context.Context) error
- func (r *Repository) RecordStopped(ctx context.Context, scope, id string, expected acpincarnation.Binding, ...) (acpincarnation.Record, error)
- func (r *Repository) RegisterVerified(ctx context.Context, candidate acpincarnation.Record) (acpincarnation.Record, error)
- func (r *Repository) ReleaseSkillPreparation(ctx context.Context, ...) error
- func (r *Repository) RenewSkillPreparation(ctx context.Context, setID int64, worker string, now time.Time, ...) error
- func (r *Repository) ResetMissingReadySkillVolume(ctx context.Context, prepared skillset.PreparedMaterialization) error
- func (r *Repository) ResetMissingSkillVolume(ctx context.Context, setID int64, worker string, now time.Time) error
- func (r *Repository) ResolvePreparedSkillSet(ctx context.Context, reference skillset.PreparedReference) (skillset.PreparedMaterialization, error)
- func (r *Repository) SetSkillPreparationFailure(ctx context.Context, setID int64, worker string, ...) error
- func (r *Repository) TryAcquireObservationLeadership(ctx context.Context) (repository.Leadership, bool, error)
- func (r *Repository) WithAgentLock(ctx context.Context, agentID string, execute func(context.Context) error) (resultErr error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func (*Repository) AdmitSkillPreparation ¶
func (r *Repository) AdmitSkillPreparation(ctx context.Context, input skillset.PrepareRequest) (skillset.PreparationReceipt, error)
AdmitSkillPreparation records an intent independently of Environment and lifecycle mutation locks. It does not perform downloads or Docker I/O.
func (*Repository) AppendObservation ¶
func (r *Repository) AppendObservation( ctx context.Context, epoch repository.ObservationEpoch, observation deployment.Observation, ) (deployment.Observation, error)
func (*Repository) BeginTransition ¶
func (r *Repository) BeginTransition( ctx context.Context, candidate deployment.Operation, ) (deployment.Operation, bool, error)
func (*Repository) CheckpointSkillPackage ¶
func (*Repository) ClaimSkillCleanup ¶
func (*Repository) ClaimSkillPreparation ¶
func (r *Repository) ClaimSkillPreparation(ctx context.Context, scope, worker string, now time.Time, lease time.Duration, capacity int) (*skillset.PreparationJob, error)
ClaimSkillPreparation serializes the global concurrency budget across RC replicas, then leases one persistent set. Expired leases retain package checkpoints and the same physical volume identity.
func (*Repository) CompleteOperation ¶
func (r *Repository) CompleteOperation( ctx context.Context, operation deployment.Operation, observation *deployment.Observation, ) (*deployment.Observation, error)
func (*Repository) CompleteSkillCleanup ¶
func (*Repository) CompleteSkillPreparation ¶
func (*Repository) FindRegistration ¶
func (r *Repository) FindRegistration(ctx context.Context, scope, member, incarnation string) (*acpincarnation.Record, error)
func (*Repository) GenerationClaim ¶
func (r *Repository) GenerationClaim( ctx context.Context, key deployment.Key, ) (repository.GenerationClaim, error)
func (*Repository) GenerationOperation ¶
func (r *Repository) GenerationOperation(ctx context.Context, key deployment.Key) (deployment.Operation, error)
func (*Repository) GetEnvironment ¶
func (r *Repository) GetEnvironment( ctx context.Context, agentID string, ) (deployment.Environment, error)
func (*Repository) GetOperation ¶
func (r *Repository) GetOperation( ctx context.Context, requestID string, ) (deployment.Operation, error)
func (*Repository) GetRegistration ¶
func (r *Repository) GetRegistration(ctx context.Context, scope, id string) (*acpincarnation.Record, error)
func (*Repository) GetSkillPreparation ¶
func (r *Repository) GetSkillPreparation(ctx context.Context, scope, organizationID, agentID, requestID string) (skillset.PreparationReceipt, error)
func (*Repository) ListEnvironments ¶
func (r *Repository) ListEnvironments( ctx context.Context, ) (result []deployment.Environment, resultErr error)
func (*Repository) ListObservations ¶
func (r *Repository) ListObservations( ctx context.Context, after uint64, limit int, ) (deployment.ObservationWindow, error)
func (*Repository) ListenObservationNotifications ¶
func (r *Repository) ListenObservationNotifications( ctx context.Context, ready func(), notify func(string), ) (resultErr error)
func (*Repository) MarkDriftedReadySkillVolume ¶
func (r *Repository) MarkDriftedReadySkillVolume(ctx context.Context, prepared skillset.PreparedMaterialization) error
MarkDriftedReadySkillVolume fences an owned but corrupt ready collection before the cleanup worker removes it. Existing logical preparation requests remain durable and will observe queued again after cleanup settles.
func (*Repository) MaxClaimedGeneration ¶
func (*Repository) ObservationMonitorReady ¶
func (r *Repository) ObservationMonitorReady(ctx context.Context) (ready bool, resultErr error)
func (*Repository) PostponeSkillCleanup ¶
func (*Repository) ProbeObservationJournal ¶
func (r *Repository) ProbeObservationJournal(ctx context.Context) error
func (*Repository) ProbeObservationNotification ¶
func (r *Repository) ProbeObservationNotification(ctx context.Context, payload string) error
func (*Repository) PruneObservationBatch ¶
func (r *Repository) PruneObservationBatch(ctx context.Context, epoch repository.ObservationEpoch) (int64, error)
func (*Repository) ReadRegistrationHistory ¶
func (r *Repository) ReadRegistrationHistory(ctx context.Context, scope, member string, cursor *acpincarnation.HistoryCursor) (acpincarnation.HistoryPage, error)
func (*Repository) RecordStopped ¶
func (r *Repository) RecordStopped(ctx context.Context, scope, id string, expected acpincarnation.Binding, candidate acpincarnation.StopReceipt) (acpincarnation.Record, error)
func (*Repository) RegisterVerified ¶
func (r *Repository) RegisterVerified(ctx context.Context, candidate acpincarnation.Record) (acpincarnation.Record, error)
func (*Repository) ReleaseSkillPreparation ¶
func (r *Repository) ReleaseSkillPreparation(ctx context.Context, scope, organizationID, agentID, requestID, ownerOperationID string) error
func (*Repository) RenewSkillPreparation ¶
func (*Repository) ResetMissingReadySkillVolume ¶
func (r *Repository) ResetMissingReadySkillVolume(ctx context.Context, prepared skillset.PreparedMaterialization) error
ResetMissingReadySkillVolume replaces a physically absent collection only when no active Runtime or accepted lifecycle operation references that set. A running source Runtime may use another set while the missing Rebuild target is rematerialized. Old operation/current-reference snapshots stay immutable.
func (*Repository) ResetMissingSkillVolume ¶
func (r *Repository) ResetMissingSkillVolume(ctx context.Context, setID int64, worker string, now time.Time) error
ResetMissingSkillVolume abandons only a proven missing physical identity. The immutable logical set and its operation references survive; the next claim uses a new materialization and downloads a fresh candidate volume.
func (*Repository) ResolvePreparedSkillSet ¶
func (r *Repository) ResolvePreparedSkillSet(ctx context.Context, reference skillset.PreparedReference) (skillset.PreparedMaterialization, error)
ResolvePreparedSkillSet is a read-only preflight. BeginTransition must repeat the same check and retain the selected materialization in its transaction; this read alone does not protect against a concurrent release or deletion.
func (*Repository) SetSkillPreparationFailure ¶
func (*Repository) TryAcquireObservationLeadership ¶
func (r *Repository) TryAcquireObservationLeadership( ctx context.Context, ) (repository.Leadership, bool, error)
func (*Repository) WithAgentLock ¶
Source Files
¶
- acp_incarnation.go
- acp_incarnation_history.go
- acp_incarnation_history_migration.go
- acp_incarnation_migration.go
- close.go
- coordination.go
- creation_migration.go
- database.go
- database_tracer.go
- instance_authentication_migration.go
- locker.go
- migrations.go
- observation_retention.go
- repository.go
- serializable.go
- skill_cleanup.go
- skill_preparation.go
- skill_worker.go
- transaction.go