postgres

package
v2.11.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package postgres keeps the people's trace in Postgres (docs/adr/0034), so every replica of a stateless deployment appends to one place and none keeps a file of its own. It knows its port and its database, nothing of the record.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

Store appends acts to a table and reads them back.

func Open

func Open(ctx context.Context, pool *pgxpool.Pool) (*Store, error)

Open makes the table, one replica at a time, and returns a store over it.

func (*Store) Read

func (s *Store) Read(ctx context.Context, q activity.Query) ([]activity.Event, error)

Read returns the acts q asks for, in the order they happened.

func (*Store) Record

func (s *Store) Record(e activity.Event)

Record appends one act. An append that fails or takes too long is dropped: a trace never fails the act it records.

Jump to

Keyboard shortcuts

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