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

db

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package db provides a wrapper around pgxpool.Pool that retries the queries

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	DBConnection *dbretrier.Pool
}

Client is the type that can perform database-related queries.

func NewClient

func NewClient(ctxWithTimeout context.Context, credentials *model.DBCredentials, retrier retry.Retry, maxConns int) (*Client, error)

NewClient returns a new postgres connection. The connection established will be shared throughout this application.

func (*Client) Close

func (c *Client) Close()

Close the connections.

Directories

Path Synopsis
Package retrier provides a wrapper around pgxpool.Pool that retries the queries
Package retrier provides a wrapper around pgxpool.Pool that retries the queries

Jump to

Keyboard shortcuts

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