server

package
v0.0.0-...-e4de74a Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenKey

func GenKey() (ed25519.PublicKey, ed25519.PrivateKey)

Types

type DataQueryBackend

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

DataQueryBackend

func NewDataQueryBackend

func NewDataQueryBackend(conn net.Conn, responder func(*pgproto3.Query) ([]byte, error)) *DataQueryBackend

func (*DataQueryBackend) Close

func (p *DataQueryBackend) Close() error

func (*DataQueryBackend) Run

func (b *DataQueryBackend) Run() error

type Option

type Option func(*Server)

func WithAddress

func WithAddress(address string) Option

WithAddress sets the listener address

func WithPort

func WithPort(port int) Option

WithPort will set the listener address to any interface on the specified port

func WithTLSCert

func WithTLSCert(s *Server, cert tls.Certificate) Option

type Server

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

func New

func New(opts ...Option) (*Server, error)

func (*Server) Serve

func (s *Server) Serve() error

func (*Server) Shutdown

func (s *Server) Shutdown(ctx context.Context) error

Jump to

Keyboard shortcuts

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