pg

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	pg.PoolConn
}

Store is a PostgreSQL-backed store for Heartbeat records.

func NewStore

func NewStore(ctx context.Context, pool pg.PoolConn) (*Store, error)

NewStore creates a new PostgreSQL-backed heartbeat store using the provided connection pool.

func (*Store) Create

func (s *Store) Create(ctx context.Context, meta schema.HeartbeatMeta) (*schema.Heartbeat, error)

func (*Store) Delete

func (s *Store) Delete(ctx context.Context, id string) (*schema.Heartbeat, error)

func (*Store) Get

func (s *Store) Get(ctx context.Context, id string) (*schema.Heartbeat, error)

func (*Store) List

func (s *Store) List(ctx context.Context, includeFired bool) ([]*schema.Heartbeat, error)

func (*Store) Next

func (s *Store) Next(ctx context.Context) ([]*schema.Heartbeat, error)

func (*Store) Update

func (s *Store) Update(ctx context.Context, id string, meta schema.HeartbeatMeta) (*schema.Heartbeat, error)

Jump to

Keyboard shortcuts

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