postgres

package
v0.0.0-...-04026ef Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PostgresStore

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

func Open

func Open(ctx context.Context, databaseURL string) (*PostgresStore, error)

func (*PostgresStore) AcknowledgeArtifactReleased

func (s *PostgresStore) AcknowledgeArtifactReleased(ctx context.Context, id string, at time.Time) (model.ArtifactRecord, error)

func (*PostgresStore) ClaimAttempt

func (s *PostgresStore) ClaimAttempt(ctx context.Context, runID, nodeID string, at, lease time.Time) (model.Attempt, bool, error)

func (*PostgresStore) Close

func (s *PostgresStore) Close() error

func (*PostgresStore) CommitFailure

func (s *PostgresStore) CommitFailure(ctx context.Context, r, n, a string, at time.Time, msg string) (bool, error)

func (*PostgresStore) CommitRetry

func (s *PostgresStore) CommitRetry(ctx context.Context, r, n, a string, at time.Time, msg string, fail int, next time.Time) (bool, error)

func (*PostgresStore) CommitSuccess

func (s *PostgresStore) CommitSuccess(ctx context.Context, r, n, a string, at time.Time, o json.RawMessage) (bool, error)

func (*PostgresStore) CreateRunForGraph

func (s *PostgresStore) CreateRunForGraph(ctx context.Context, g string, input json.RawMessage) (model.RunRecord, error)

func (*PostgresStore) DeleteExecutionBinding

func (s *PostgresStore) DeleteExecutionBinding(ctx context.Context, task, revision string) (bool, error)

func (*PostgresStore) ListActiveRunIDs

func (s *PostgresStore) ListActiveRunIDs(ctx context.Context) ([]string, error)

func (*PostgresStore) ListArtifacts

func (s *PostgresStore) ListArtifacts(ctx context.Context, runID string) ([]model.ArtifactRecord, error)

func (*PostgresStore) ListAttempts

func (s *PostgresStore) ListAttempts(ctx context.Context, runID string, node *string) ([]model.Attempt, error)

func (*PostgresStore) ListTaskContractHeadsByOwner

func (s *PostgresStore) ListTaskContractHeadsByOwner(ctx context.Context, owner string) ([]model.TaskContractHead, error)

func (*PostgresStore) LoadAttempt

func (s *PostgresStore) LoadAttempt(ctx context.Context, id string) (model.Attempt, error)

func (*PostgresStore) LoadExecutionBinding

func (s *PostgresStore) LoadExecutionBinding(ctx context.Context, task, revision string) (model.ExecutionBinding, error)

func (*PostgresStore) LoadGraph

func (s *PostgresStore) LoadGraph(ctx context.Context, r string) (model.GraphDefinition, error)

func (*PostgresStore) LoadGraphHead

func (s *PostgresStore) LoadGraphHead(ctx context.Context, n string) (string, error)

func (*PostgresStore) LoadRun

func (s *PostgresStore) LoadRun(ctx context.Context, id string) (model.Run, error)

func (*PostgresStore) LoadRunRecord

func (s *PostgresStore) LoadRunRecord(ctx context.Context, id string) (model.RunRecord, error)

func (*PostgresStore) LoadTaskContract

func (s *PostgresStore) LoadTaskContract(ctx context.Context, task, revision string) (model.TaskContract, error)

func (*PostgresStore) LoadTaskContractHead

func (s *PostgresStore) LoadTaskContractHead(ctx context.Context, task string) (model.TaskContractHead, error)

func (*PostgresStore) PublishPackage

func (*PostgresStore) PublishTaskContract

func (*PostgresStore) RegisterGraph

func (*PostgresStore) RenewAttempt

func (s *PostgresStore) RenewAttempt(ctx context.Context, id string, lease time.Time) (bool, error)

func (*PostgresStore) RetryNode

func (s *PostgresStore) RetryNode(ctx context.Context, runID, nodeID string) (bool, error)

func (*PostgresStore) SaveExecutionBinding

func (s *PostgresStore) SaveExecutionBinding(ctx context.Context, b model.ExecutionBinding) (model.ExecutionBinding, error)

type Provider

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

Provider owns the PostgreSQL pool. Each scoped store establishes its tenant with transaction-local state before executing application SQL.

func OpenProvider

func OpenProvider(ctx context.Context, databaseURL string) (*Provider, error)

OpenProvider opens a migration-capable provider. Use it with a database owner during deployment or local development.

func OpenRestrictedProvider

func OpenRestrictedProvider(ctx context.Context, databaseURL string) (*Provider, error)

OpenRestrictedProvider opens the runtime provider without schema DDL. The database must already be migrated and the role must remain subject to RLS.

func (*Provider) Close

func (p *Provider) Close() error

func (*Provider) DefaultStore

func (p *Provider) DefaultStore(ctx context.Context) (store.Store, error)

func (*Provider) ForTenant

func (p *Provider) ForTenant(_ context.Context, id store.TenantID) (store.Store, error)

Jump to

Keyboard shortcuts

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