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 ¶
View Source
var ( ErrTimeout = errors.New(http.StatusText(http.StatusRequestTimeout)) ErrForbidden = errors.New(http.StatusText(http.StatusForbidden)) )
Functions ¶
func NewRelayServerError ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(config ClientConfig) *Client
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
Click to show internal directories.
Click to hide internal directories.