GitHubGet started

package pgstore

import "github.com/nsgo-dev/game/pkg/online/leaderboard/selfhost/pgstore"

Only on linux, macos, windows, android, ios

Overview

Package pgstore is experimental: its API and documented formats may change in a minor release. See the API stability policy. keeps the self-hosted leaderboard's records in Postgres through the pgx driver, so several service processes can share them.

Index

Functions

func Open(ctx context.Context, dsn string) (*sqlstore.Store, error)

Open connects to the Postgres database at dsn, migrates its leaderboard schema and returns a store over it. Several service processes may share the database.