client

package
v0.0.0-...-53f1697 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Overview

Package main runs a local HTTP relay client.

See the documentation of ../http-relay-server/main.go for details about the system architecture. In a nutshell, this program pulls serialized HTTP requests from a remote relay server, redirects them to a local backend, and posts the serialized response to the relay server.

Index

Constants

This section is empty.

Variables

Functions

func NewRelayServerError

func NewRelayServerError(msg string) error

Types

type Client

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

func NewClient

func NewClient(config ClientConfig) *Client

func (*Client) Start

func (c *Client) Start()

type ClientConfig

type ClientConfig struct {
	RemoteRequestTimeout   time.Duration
	BackendResponseTimeout time.Duration
	IdleConnTimeout        time.Duration
	ReadIdleTimeout        time.Duration

	DisableAuthForRemote    bool
	RootCAFile              string
	AuthenticationTokenFile string

	BackendScheme  string
	BackendAddress string
	BackendPath    string
	PreserveHost   bool

	RelayScheme  string
	RelayAddress string
	RelayPrefix  string

	ServerName string

	NumPendingRequests  int
	MaxIdleConnsPerHost int

	MaxChunkSize int
	BlockSize    int

	DisableHttp2 bool
	ForceHttp2   bool
}

func DefaultClientConfig

func DefaultClientConfig() ClientConfig

type RelayServerError

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

func (*RelayServerError) Error

func (e *RelayServerError) Error() string

Jump to

Keyboard shortcuts

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