sqlstore

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2026 License: AGPL-3.0, AGPL-3.0-or-later Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SchemaStatements

func SchemaStatements(dialect db.Dialect) ([]string, error)

Types

type Store

type Store struct {
	// contains filtered or unexported fields
}

func New

func New(database *sql.DB, dialect db.Dialect) (*Store, error)

func (*Store) Accept

func (*Store) ClaimDue

func (s *Store) ClaimDue(ctx context.Context, owner string, limit uint16, lease time.Duration) ([]management.Claim, error)

func (*Store) ClaimDueForDeployment

func (s *Store) ClaimDueForDeployment(ctx context.Context, owner string, limit uint16, lease time.Duration, deployment contract.DeploymentID) ([]management.Claim, error)

func (*Store) EnsureSchema

func (s *Store) EnsureSchema(ctx context.Context) error

func (*Store) Finish

func (s *Store) Finish(ctx context.Context, claim management.Claim, outcome management.FinishResult) error

func (*Store) Get

func (*Store) Release

func (s *Store) Release(ctx context.Context, claim management.Claim) error

func (*Store) Renew

func (s *Store) Renew(ctx context.Context, claim management.Claim, lease time.Duration) (management.Claim, error)

func (*Store) RetryDeleteOperation

func (s *Store) RetryDeleteOperation(ctx context.Context, caller contract.PrincipalID, id contract.OperationID, key contract.IdempotencyKey, reason string) (management.Operation, error)

RetryDeleteOperation requeues only an uncertain deletion with the original, validated checkpoint reference. The Engine executor must reverify that reference against the current allocation before continuing teardown.

func (*Store) RetryPackageOperation

func (s *Store) RetryPackageOperation(ctx context.Context, caller contract.PrincipalID, id contract.OperationID, key contract.IdempotencyKey, reason string) (management.Operation, error)

RetryPackageOperation requeues an uncertain package command without changing its operation ID or command. Package activation is safe to resume only through its tenant-local journal, artifact digest check, and claim fencing; the executor owns those checks.

func (*Store) RetryProvisionOperation

func (s *Store) RetryProvisionOperation(ctx context.Context, caller contract.PrincipalID, id contract.OperationID, key contract.IdempotencyKey, reason string) (management.Operation, error)

RetryProvisionOperation requeues only a recovery_required base-provision command with no package effect. The Engine executor revalidates its configured deployment/allocation and compares any existing directory row before replay.

func (*Store) RetryStateOperation

func (s *Store) RetryStateOperation(ctx context.Context, caller contract.PrincipalID, id contract.OperationID, key contract.IdempotencyKey, reason string) (management.Operation, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL