Help us shape the future of Go! Take the 2026 Go Developer Survey

postgres

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DSN string

	Host     string
	Port     int
	Database string
	Username string
	Password string
	SSLMode  string

	Schema      string
	TablePrefix string
	Tables      TableNames

	MaxOpenConns    int
	MaxIdleConns    int
	ConnMaxLifetime time.Duration
}

type Store

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

func New

func New(config Config) *Store

func (*Store) ClaimAlertEvent

func (s *Store) ClaimAlertEvent(ctx context.Context, state uptime.AlertState) (uptime.AlertDecision, error)

func (*Store) Cleanup

func (s *Store) Cleanup(ctx context.Context, options uptime.CleanupOptions) error

func (*Store) Close

func (s *Store) Close() error

func (*Store) Init

func (s *Store) Init(ctx context.Context) error

func (*Store) ListServices

func (s *Store) ListServices(ctx context.Context) ([]uptime.Service, error)

func (*Store) Name

func (s *Store) Name() string

func (*Store) QueryDaily

func (s *Store) QueryDaily(ctx context.Context, options uptime.QueryDailyOptions) ([]uptime.DailyStatus, error)

func (*Store) QueryTodaySamples

func (s *Store) QueryTodaySamples(ctx context.Context, options uptime.QueryTodaySamplesOptions) ([]uptime.TodaySampleStatus, error)

func (*Store) RollupDaily

func (s *Store) RollupDaily(ctx context.Context, options uptime.RollupOptions) error

func (*Store) UpsertInstance

func (s *Store) UpsertInstance(ctx context.Context, instance uptime.Instance) error

func (*Store) UpsertService

func (s *Store) UpsertService(ctx context.Context, service uptime.Service) error

func (*Store) WriteHeartbeat

func (s *Store) WriteHeartbeat(ctx context.Context, heartbeat uptime.Heartbeat) error

type TableNames

type TableNames struct {
	Services   string
	Instances  string
	Samples    string
	Daily      string
	AlertState string
}

Jump to

Keyboard shortcuts

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