util

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LogColor bool = false
View Source
var LogLevel int = 0
View Source
var Logf func(int, string, ...interface{}) (int, error) = defaultLogf

Functions

func Prompt

func Prompt(ctx context.Context, prompt string) (string, error)

func PromptYesNo

func PromptYesNo(ctx context.Context, question string) (bool, error)

Types

type BlockWatchedPoolConn

type BlockWatchedPoolConn struct {
	*pgxpool.Conn
	// contains filtered or unexported fields
}

func AcquireWithBlockWatcher

func AcquireWithBlockWatcher(
	ctx context.Context,
	pool *pgxpool.Pool,
	maxBlockDuration time.Duration,
	maxBlockProcesses int,
) (
	*BlockWatchedPoolConn,
	error,
)

func (*BlockWatchedPoolConn) Release

func (c *BlockWatchedPoolConn) Release()

type BlockWatcher

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

func (*BlockWatcher) Watch

func (w *BlockWatcher) Watch(ctx context.Context) error

type Dumper

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

func NewDumper

func NewDumper(pgCfg *pgx.ConnConfig, command string) (*Dumper, error)

func (*Dumper) Dump

func (d *Dumper) Dump(ctx context.Context, outputPath string) error

Jump to

Keyboard shortcuts

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