persist

package
v0.0.0-...-7632013 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

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

func Open

func Open(ctx context.Context, path string) (*DB, error)

func (*DB) Begin

func (db *DB) Begin(ctx context.Context) (*Tx, error)

func (*DB) Close

func (db *DB) Close() error

type Tx

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

func (*Tx) Commit

func (tx *Tx) Commit() error

func (*Tx) InsertMessageID

func (tx *Tx) InsertMessageID(ctx context.Context, account string, msg message.ID) error

func (*Tx) LatestHistoryID

func (tx *Tx) LatestHistoryID(ctx context.Context) (uint64, error)

func (*Tx) ListUpdated

func (tx *Tx) ListUpdated(ctx context.Context, account string, limit int, handler func(message.ID) error) error

func (*Tx) Rollback

func (tx *Tx) Rollback() error

func (*Tx) UpdateHeader

func (tx *Tx) UpdateHeader(ctx context.Context, account string, hdr *message.Header) error

func (*Tx) WriteHistoryID

func (tx *Tx) WriteHistoryID(ctx context.Context, account string, history_id uint64) error

Jump to

Keyboard shortcuts

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