River

riverpropgxv5

package module
v0.6.0 Go to latest
Published: Nov 3, 2024 License: Proprietary

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver struct {
	riverpgxv5.Driver
	// contains filtered or unexported fields
}

Driver is an implementation of riverdriver.Driver for Pgx v5.

func New

func New(dbPool *pgxpool.Pool) *Driver

func (*Driver) GetExecutor

func (d *Driver) GetExecutor() riverdriver.Executor

func (*Driver) GetMigrationFS

func (d *Driver) GetMigrationFS(line string) fs.FS

func (*Driver) GetMigrationLines

func (d *Driver) GetMigrationLines() []string

func (*Driver) GetProExecutor

func (d *Driver) GetProExecutor() driver.ProExecutor

func (*Driver) HasPool

func (d *Driver) HasPool() bool

func (*Driver) PluginInit

func (d *Driver) PluginInit(archetype *baseservice.Archetype, client *river.Client[pgx.Tx])

PluginInit initializes a plugin with an archetype and client. It's invoked on Client.NewClient.

func (*Driver) PluginMaintenanceServices

func (d *Driver) PluginMaintenanceServices() []startstop.Service

PluginMaintenanceServices returns additional maintenance services (will only run on an elected leader) for a River client.

func (*Driver) PluginPilot

func (d *Driver) PluginPilot() riverpilot.Pilot

func (*Driver) PluginServices

func (d *Driver) PluginServices() []startstop.Service

PluginServices returns additional non-maintenance services (will run on all clients) for a River client.

func (*Driver) ProConfigInit

func (d *Driver) ProConfigInit(pilot riverpilot.Pilot, config *driver.Config)

func (*Driver) UnwrapExecutor

func (d *Driver) UnwrapExecutor(tx pgx.Tx) riverdriver.ExecutorTx

func (*Driver) UnwrapProExecutor

func (d *Driver) UnwrapProExecutor(tx pgx.Tx) driver.ProExecutorTx

type Executor

type Executor struct {
	// riverdriver.Executor
	*riverpgxv5.Executor
	// contains filtered or unexported fields
}

func (*Executor) Begin

func (*Executor) BeginPro

func (e *Executor) BeginPro(ctx context.Context) (driver.ProExecutorTx, error)

func (*Executor) JobGetAvailable

func (e *Executor) JobGetAvailable(ctx context.Context, params *riverdriver.JobGetAvailableParams) ([]*rivertype.JobRow, error)

func (*Executor) SequenceAppendMany

func (e *Executor) SequenceAppendMany(ctx context.Context, seqKeys []string) (int, error)

func (*Executor) SequenceList

func (e *Executor) SequenceList(ctx context.Context, maxCount int) ([]*driver.Sequence, error)

func (*Executor) SequencePromote

func (e *Executor) SequencePromote(ctx context.Context, params *driver.SequencePromoteParams) ([]string, error)

func (*Executor) SequencePromoteFromTable

func (*Executor) SequenceScanAndPromoteStalled

func (*Executor) WorkflowCancel

func (e *Executor) WorkflowCancel(ctx context.Context, params *driver.WorkflowCancelParams) ([]*rivertype.JobRow, error)

func (*Executor) WorkflowLoadTasksByNames

func (e *Executor) WorkflowLoadTasksByNames(ctx context.Context, params *driver.WorkflowLoadTasksByNamesParams) ([]*driver.WorkflowTask, error)

type ExecutorTx

type ExecutorTx struct {
	Executor
	// contains filtered or unexported fields
}

func (*ExecutorTx) Commit

func (t *ExecutorTx) Commit(ctx context.Context) error

func (*ExecutorTx) Rollback

func (t *ExecutorTx) Rollback(ctx context.Context) error