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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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