postgres

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEventStore

func NewEventStore(db *pgxpool.Pool) es.EventStore

func NewSequenceStore

func NewSequenceStore(db *pgxpool.Pool) es.SequenceStore

Types

type EventStore

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

func (*EventStore) LastKnownSequence

func (s *EventStore) LastKnownSequence() int64

func (*EventStore) Read

func (s *EventStore) Read(sequence int64) (*es.Event, error)

func (*EventStore) ReadAll

func (s *EventStore) ReadAll(ctx context.Context, sel es.Selector, bracket es.Bracket, handler es.EventHandler) error

func (*EventStore) Store

func (s *EventStore) Store(event *es.Event) (int64, error)

type SequenceStore

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

func (*SequenceStore) Get

func (s *SequenceStore) Get(persistentClientID string) (int64, error)

func (*SequenceStore) Store

func (s *SequenceStore) Store(persistentClientID string, sequence int64) error

Jump to

Keyboard shortcuts

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