pggw

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectionResolver

type ConnectionResolver func(ctx context.Context, params map[string]string) (RemotePgBackend, error)

ConnectionResolver resolves a local postgres connection string to a remote backend.

type GatedSession

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

func (*GatedSession) Close

func (s *GatedSession) Close()

func (*GatedSession) Run

func (s *GatedSession) Run(ctx context.Context)

type Gateway

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

func NewGateway

func NewGateway(resolver ConnectionResolver, opts ...GatewayOption) *Gateway

func (*Gateway) Close

func (gw *Gateway) Close() error

func (*Gateway) Serve

func (gw *Gateway) Serve(ctx context.Context, addr string) error

type GatewayOption

type GatewayOption func(gw *Gateway)

type RemotePgBackend

type RemotePgBackend struct {
	Host     string
	Port     int
	User     string
	Password string
	Database string
	Params   map[string]string
}

type Session

type Session interface {
	Run(ctx context.Context)
	Close()
}

Jump to

Keyboard shortcuts

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