Documentation ¶
Index ¶
Constants ¶
View Source
const BufferSize = 256 * 1024
BufferSize for coybuffer and websocket
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthConfig ¶
type Config ¶
type Config struct { Addr string `yaml:"addr"` // NotFound is a file path to handles unhandled requests. NotFound string `yaml:"not_found"` // NotFoundDisabled if value is true, disables handle unhandled requests. NotFoundDisabled bool `yaml:"not_found_disabled"` TCPSockets TCPSocketsConfig `yaml:"tcp_sockets"` HTTP struct { Routes map[string]*HttpConfig `yaml:"routes"` } `yaml:"http"` }
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler handlers
type HttpConfig ¶
type HttpConfig struct { Addr string `yaml:"addr"` PathStrip bool `yaml:"path_strip"` PathHeader string `yaml:"path_header"` Dir string `yaml:"dir"` // PathOverride overrides real file path. // This formatter haves 3 values: // 1. The requested path // 2. The DIR // 3. The route PATH PathOverride string `yaml:"path_override"` Disabled bool `yaml:"disabled"` }
func (*HttpConfig) ToString ¶
func (c *HttpConfig) ToString(dir string) string
type TCPSocketConfig ¶
type TCPSocketConfig struct { Addr string `yaml:"addr"` Auth *AuthConfig `yaml:"auth"` Disabled bool `yaml:"disabled"` }
func (*TCPSocketConfig) String ¶
func (c *TCPSocketConfig) String() string
type TCPSocketsConfig ¶
type TCPSocketsConfig struct { HandshakeTimeout uint8 `yaml:"handshake_timeout"` DialTimeout uint8 `yaml:"dial_timeout"` WriteTimeout uint8 `yaml:"write_timeout"` CompressionEnabled bool `yaml:"compression_enabled"` Auth *AuthConfig `yaml:"auth"` Routes map[string]*TCPSocketConfig `yaml:"routes"` }
func (*TCPSocketsConfig) Defaults ¶
func (c *TCPSocketsConfig) Defaults()
Click to show internal directories.
Click to hide internal directories.