Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultPort is the default port number to listen on. DefaultPort = 80 // DefaultBlockSize is the default size of i/o buffer in bytes. DefaultBlockSize = 10 * 1024 // DefaultInactiveRequestTimeout is the default timeout for inactive requests. In particular, this sets a limit on how long the backend can wait before writing headers and the response status. DefaultInactiveRequestTimeout = 60 * time.Second // DefaultInactiveBackendTimeout is the default timeout for inactive backends. DefaultInactiveBackendTimeout = 30 * time.Minute )
Variables ¶
View Source
var ( ErrMultipleClients = errors.New("multiple clients trying to handle request ID") ErrRelayTimeout = errors.New("timeout waiting for relay client to accept request") ErrNoRequest = errors.New("no request received within timeout") ErrServerRestarting = errors.New("server is restarting") ErrInvalidRequestID = errors.New("duplicate or invalid request ID") ErrClosedInactivity = errors.New("closed due to inactivity") )
View Source
var ( ErrRequestPathTooShort = errors.New("request path too short") ErrMissingServerNameHeader = errors.New("missing required header") )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Port number to listen on.
Port int
// BlockSize is the size of i/o buffer in bytes.
BlockSize int
// InactiveRequestTimeout is the timeout for inactive requests.
InactiveRequestTimeout time.Duration
// InactiveBackendTimeout is the timeout for inactive backends.
InactiveBackendTimeout time.Duration
}
type RelayClientUnavailableError ¶
type RelayClientUnavailableError struct {
// contains filtered or unexported fields
}
func (*RelayClientUnavailableError) Error ¶
func (e *RelayClientUnavailableError) Error() string
Click to show internal directories.
Click to hide internal directories.