Documentation ¶
Overview ¶
Package pgxstore provides an implementation of history.Store backed by a Postgres database. The historical records for all stores are stored in a single table disambiguated via the source parameter.
Index ¶
- Constants
- func New(ctx context.Context, source, connStr string, opts ...Option) (history.Store, error)
- func NewStoreFromPool(source string, pool *pgxpool.Pool, opts ...Option) history.Store
- func SetupDB(ctx context.Context, pool *pgxpool.Pool) error
- func SetupStoreFromPool(ctx context.Context, source string, pool *pgxpool.Pool, opts ...Option) (history.Store, error)
- type Option
- type Store
Constants ¶
View Source
const LargeMaxCount = 1e7
Variables ¶
This section is empty.
Functions ¶
func NewStoreFromPool ¶
Types ¶
type Option ¶
type Option func(*Store)
func WithLogger ¶
WithLogger is an option to set the logger used by the store.
func WithMaxAge ¶
WithMaxAge is an option to set the maximum age of records in the store.
func WithMaxCount ¶
WithMaxCount is an option to set the maximum number of records in the store.
Click to show internal directories.
Click to hide internal directories.