server

package
v0.0.0-...-5e61f33 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package server is intended to provide the concrete reverse proxy server implementation.

Index

Constants

View Source
const (
	// DefaultProxyPort is the default value for `Config.Port`.
	DefaultProxyPort = 5397
)

Variables

View Source
var (
	// ErrInvalidConfiguration is the error returned when a `Config` fails
	// validation.
	ErrInvalidConfiguration = errors.New("invalid configuration")
	// ErrPacketTooLarge is the error returned when a TCP packet from a read
	// is too large.
	ErrPacketTooLarge = errors.New("packet too large")
)

Functions

func Execute

func Execute() error

Execute runs the PostgreSQL reverse proxy server as a command line (CLI) application.

func Run

func Run(c Config) error

Run starts the PostgreSQL reverse proxy server.

Types

type Config

type Config struct {
	// ProxyPort is the port where the proxy should expose the server
	ProxyPort int
	// RemoteAddr is the address where the proxy should forward traffic. For
	// example `localhost:22089`
	RemoteAddr string
}

Config represents the values needed to configure a server.

func (Config) Validate

func (c Config) Validate() error

Jump to

Keyboard shortcuts

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