pg

package
v0.0.0-...-d85f02a Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Postgres

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

func (*Postgres) AddMessage

func (pg *Postgres) AddMessage(
	ctx context.Context,
	tx *sqlx.Tx,
	message types.Outbox,
) error

AddMessage adds message to outbox

func (*Postgres) GetMessagesFromPos

func (pg *Postgres) GetMessagesFromPos(
	ctx context.Context,
	processName string,
	position int64,
	limit int,
) ([]types.Outbox, error)

func (*Postgres) GetPositionWithLock

func (pg *Postgres) GetPositionWithLock(ctx context.Context, processName string) (int64, error)

func (*Postgres) Init

func (pg *Postgres) Init(option *types.Option)

func (*Postgres) SetPosition

func (pg *Postgres) SetPosition(ctx context.Context, processName string, position int64) error

func (*Postgres) UpsertCursor

func (pg *Postgres) UpsertCursor(ctx context.Context, cursor types.Cursor) error

Jump to

Keyboard shortcuts

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