backend

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnInfo

type ConnInfo struct {
	ClientAddress     net.Addr
	ServerAddress     net.Addr
	BackendProcessID  uint32
	BackendSecretKey  uint32
	StartupParameters map[string]string
}

type ConnInfoStore

type ConnInfoStore interface {
	Find(clientAddress net.Addr, backendProcessID, backendSecretKey uint32) (*ConnInfo, error)
	Save(*ConnInfo) error
	Delete(*ConnInfo) error
}

type InMemoryConnInfoStore

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

func NewInMemoryConnInfoStore

func NewInMemoryConnInfoStore() *InMemoryConnInfoStore

func (*InMemoryConnInfoStore) Delete

func (s *InMemoryConnInfoStore) Delete(i *ConnInfo) error

func (*InMemoryConnInfoStore) Find

func (s *InMemoryConnInfoStore) Find(clientAddress net.Addr, backendProcessID, backendSecretKey uint32) (*ConnInfo, error)

func (*InMemoryConnInfoStore) Save

func (s *InMemoryConnInfoStore) Save(i *ConnInfo) error

type PGResolver

type PGResolver interface {
	GetPGConn(ctx context.Context, clientAddr net.Addr, parameters map[string]string) (net.Conn, error)
}

type PGStartupMessageRewriter

type PGStartupMessageRewriter interface {
	RewriteParameters(original map[string]string) map[string]string
}

type StaticPGResolver

type StaticPGResolver struct {
	Address string
}

func NewStaticPGResolver

func NewStaticPGResolver(addr string) *StaticPGResolver

func (*StaticPGResolver) GetPGConn

func (r *StaticPGResolver) GetPGConn(ctx context.Context, clientAddr net.Addr, parameters map[string]string) (net.Conn, error)

Jump to

Keyboard shortcuts

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