pg

package
v0.0.0-...-1bf90d9 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(ctx context.Context, masterDSN string, replicaDSNs []string) (*Client, error)

func (*Client) Close

func (c *Client) Close() error

func (*Client) MasterDB

func (c *Client) MasterDB() *pgxpool.Pool

func (*Client) ReplicaDB

func (c *Client) ReplicaDB() *pgxpool.Pool

func (*Client) ReplicaDBs

func (c *Client) ReplicaDBs() []*pgxpool.Pool

Jump to

Keyboard shortcuts

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