Documentation
¶
Overview ¶
Package sqlitestore is a small file-backed reference adapter for lifecycle conformance and host examples. It serializes management metadata in one SQLite row; high-volume hosts should implement the same contract with normalized tables. It is never installed by DataModule automatically. Providers/targets must still implement fencing, physical recovery and their own retention/cleanup policy.
Index ¶
- type Options
- type Store
- func (s *Store) Acquire(ctx context.Context, id string, target data.TargetKey, ttl time.Duration) (data.Lease, error)
- func (s *Store) AcquireRecovery(ctx context.Context, id string, target data.TargetKey, ttl time.Duration) (data.Lease, error)
- func (s *Store) BeginIntent(ctx context.Context, l data.Lease, intent data.Intent, revision uint64) error
- func (*Store) Capabilities() data.StoreCapabilities
- func (s *Store) CheckCleanup(ctx context.Context, lease data.Lease, stageID string) error
- func (s *Store) CheckLease(ctx context.Context, l data.Lease) error
- func (s *Store) Claim(ctx context.Context, op data.Operation) (out data.Claim, err error)
- func (s *Store) Close() error
- func (s *Store) GetArtifact(ctx context.Context, provider, id string) (out data.ArtifactRef, err error)
- func (s *Store) GetOperation(ctx context.Context, id string) (out data.Operation, err error)
- func (s *Store) GetReceipt(ctx context.Context, id string) (out data.PreparationReceipt, err error)
- func (s *Store) ListOperations(ctx context.Context, target data.TargetKey, limit int) (out []data.Operation, err error)
- func (s *Store) Prune(ctx context.Context) error
- func (s *Store) PutReceipt(ctx context.Context, l data.Lease, r data.PreparationReceipt) error
- func (s *Store) PutVerification(ctx context.Context, l data.Lease, id string, contentRev uint64, ...) (out data.PreparationReceipt, err error)
- func (s *Store) Release(ctx context.Context, l data.Lease) error
- func (s *Store) Renew(ctx context.Context, l data.Lease, ttl time.Duration) (out data.Lease, err error)
- func (s *Store) RequestCancel(ctx context.Context, id string, rev uint64) (out data.Operation, err error)
- func (s *Store) ResolveIntent(ctx context.Context, l data.Lease, intent data.Intent, ...) (out data.Operation, err error)
- func (s *Store) Save(ctx context.Context, next data.Operation, rev uint64, l *data.Lease) (out data.Operation, err error)
- func (s *Store) Target(ctx context.Context, target data.TargetKey) (out data.TargetState, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) AcquireRecovery ¶
func (*Store) BeginIntent ¶
func (*Store) Capabilities ¶
func (*Store) Capabilities() data.StoreCapabilities
func (*Store) CheckCleanup ¶
func (*Store) GetArtifact ¶
func (*Store) GetOperation ¶
func (*Store) GetReceipt ¶
func (*Store) ListOperations ¶
func (*Store) Prune ¶
Prune protects active/pending/rollback receipts and nonterminal operations. It never deletes target generations or fence counters. Expired operation claims retain tombstones through RetryWindow, preventing a duplicate effect on retry.