Versions in this module Expand all Collapse all v0 v0.1.0 Nov 4, 2019 Changes in this version + func NewPostgresConnection(url string) (*pgx.Conn, error) + func NewPostgresPool(url string) (*pgx.ConnPool, error) + type CollectorWrappedInTransaction struct + func NewCollectorWrappedInTransaction(decorated store.Collector, connection Transactionable) *CollectorWrappedInTransaction + func (c *CollectorWrappedInTransaction) Collect(ctx context.Context, event *cloudevents.Event) error + type Consumer struct + func NewConsumer(url string) (*Consumer, error) + func (c *Consumer) ConsumeFor(channel chan cloudevents.Event) + type Execable interface + ExecEx func(ctx context.Context, sql string, options *pgx.QueryExOptions, ...) (commandTag pgx.CommandTag, err error) + type Lock struct + func NewLock(pool *pgx.ConnPool) *Lock + func (l *Lock) Lock(ctx context.Context, identifier string) error + func (l *Lock) Release(identifier string) error + type Publisher struct + func NewPublisher(conn Execable) *Publisher + func (p *Publisher) Publish(ctx context.Context, stream string, event *cloudevents.Event) error + type Queryable interface + QueryEx func(ctx context.Context, sql string, options *pgx.QueryExOptions, ...) (rows *pgx.Rows, err error) + QueryRowEx func(ctx context.Context, sql string, options *pgx.QueryExOptions, ...) *pgx.Row + type ReadableQueryResult interface + Scan func(dest ...interface{}) (err error) + type Storage struct + func NewStorage(conn Queryable) *Storage + func (s *Storage) Find(ctx context.Context, id string) (*cloudevents.Event, error) + func (s *Storage) MatchingStream(ctx context.Context, matcher events.Matcher) chan cloudevents.Event + func (s *Storage) Store(ctx context.Context, stream string, event *cloudevents.Event) error + type Transactionable interface + BeginEx func(ctx context.Context, txOptions *pgx.TxOptions) (*pgx.Tx, error)