postgres

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultShutdownTimeout = 10 * time.Second
	DefaultShutdownHandler = true
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	Client() *gorm.DB
	SetClient(client *gorm.DB) Interface
	UseTelemetry(telemetry telemetry.Interface) error
	Migrate(migrations []*gormigrate.Migration, options *gormigrate.Options) error
	GetShutdownTimeout() time.Duration
	GetShutdownHandler() bool
	Shutdown(ctx context.Context, reason string) error
	ShutdownHandler(sig os.Signal) error
}

func New

func New(opts ...Option) Interface

type Option

type Option func(*p)

func WithClient

func WithClient(client *gorm.DB) Option

func WithClientOptions

func WithClientOptions(opts ...client.Option) Option

func WithShutdownTimeout

func WithShutdownTimeout(timeout time.Duration) Option

func WithoutShutdownHandler

func WithoutShutdownHandler() Option

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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