postgres

package
v0.5.2 Latest Latest
Warning

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

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

Documentation

Overview

Package postgres keeps protocol wire envelopes in Postgres: the server.ProtocolWireStore a protocol reads on session/load. The host owns the pool. The table is separate from the harness session checkpoints (package session/postgres), and the pool can be shared with them.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WireStore

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

WireStore implements server.ProtocolWireStore against Postgres. Call Setup once per database. Tracing is the pool's own (ConnConfig.Tracer).

func NewWireStore

func NewWireStore(pool *pgxpool.Pool, protocolKey string) *WireStore

NewWireStore stores envelopes through pool. protocolKey labels rows (e.g. "acp"); empty defaults to "acp".

func (*WireStore) Delete

func (s *WireStore) Delete(ctx context.Context, sessionID string) error

func (*WireStore) Get

func (s *WireStore) Get(ctx context.Context, sessionID string) ([]byte, error)

func (*WireStore) Put

func (s *WireStore) Put(ctx context.Context, sessionID string, payload []byte) error

func (*WireStore) Setup

func (s *WireStore) Setup(ctx context.Context) error

Setup creates public.protocol_wire_session (idempotent). Concurrent runs (hosts that start together) wait for each other on an advisory lock.

Jump to

Keyboard shortcuts

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