postgres

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Methods added in v0.4.0

func Methods() []string

Methods returns module methods

func ModuleName added in v0.4.0

func ModuleName(name string) string

ModuleName returns the module name

Types

type Postgres

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

Postgres represents the datasource of the type Postgres

func New

func New(cfg postgres.Postgres, connFunc SQLConnectFunc, logger *zap.Logger) (*Postgres, error)

New creates new Postgres datasource

func (*Postgres) GetLoader

func (m *Postgres) GetLoader(_ modules.Job) lua.LGFunction

GetLoader returns the datasource lua loader

func (*Postgres) Name

func (m *Postgres) Name() string

Name returns the datasource name

func (*Postgres) Stop

func (m *Postgres) Stop() error

Stop the datasource

type SQLConnectFunc added in v0.9.1

type SQLConnectFunc func(ctx context.Context, connString string) (*pgxpool.Pool, error)

Jump to

Keyboard shortcuts

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