Documentation ¶
Index ¶
- Constants
- Variables
- type Config
- type LogLevel
- type ReverseProxyConn
- type Server
- func (server *Server) Config() (config *Config)
- func (server *Server) HandlePanic()
- func (server *Server) Log(level LogLevel, message string)
- func (server *Server) Run()
- func (server *Server) RunReverseProxyConn(webConn *websocket.Conn, proxiedIP net.IP, secure bool, config *Config)
- func (server *Server) SetConfig(config *Config)
- func (server *Server) Shutdown()
- type TLSListenConfig
- type WSListener
Constants ¶
View Source
const (
DefaultMaxLineLen = 512
)
Variables ¶
View Source
var (
InvalidIRCSyntax = errors.New("invalid IRC syntax")
)
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Listeners map[string]listenerConfigBlock UnixBindMode os.FileMode `yaml:"unix-bind-mode"` GatewayName string `yaml:"gateway-name"` Upstreams []reverseProxyUpstream DialTimeout time.Duration `yaml:"dial-timeout"` LookupHostnames bool `yaml:"lookup-hostnames"` ForwardConfirmHostnames bool `yaml:"forward-confirm-hostnames"` ProxyAllowedFrom []string `yaml:"proxy-allowed-from"` MaxLineLen int `yaml:"max-line-len"` AllowedOrigins []string `yaml:"allowed-origins"` PprofListener string `yaml:"pprof-listener"` LogLevel string `yaml:"log-level"` Transcoding struct { EnableChardet bool `yaml:"enable-chardet"` Encodings []string // contains filtered or unexported fields } Filename string // contains filtered or unexported fields }
Config defines the overall configuration.
func LoadConfig ¶
LoadConfig loads the given YAML configuration file.
func LoadRawConfig ¶
LoadRawConfig loads the config without doing any consistency checks or postprocessing
type ReverseProxyConn ¶
type ReverseProxyConn struct {
// contains filtered or unexported fields
}
func NewReverseProxyConn ¶
func (*ReverseProxyConn) Close ¶
func (r *ReverseProxyConn) Close()
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the main Oragono server.
func (*Server) HandlePanic ¶
func (server *Server) HandlePanic()
func (*Server) RunReverseProxyConn ¶
type TLSListenConfig ¶
TLSListenConfig defines configuration options for listening on TLS.
type WSListener ¶
type WSListener struct {
// contains filtered or unexported fields
}
WSListener is a listener for IRC-over-websockets (initially HTTP, then upgraded to a different application protocol that provides a message-based API, possibly with TLS)
func NewListener ¶
func NewListener(server *Server, addr string, config utils.ListenerConfig, bindMode os.FileMode) (result *WSListener, err error)
NewListener creates a new listener according to the specifications in the config file
func NewWSListener ¶
func NewWSListener(server *Server, addr string, listener *utils.ReloadableListener, config utils.ListenerConfig) (result *WSListener, err error)
func (*WSListener) Reload ¶
func (wl *WSListener) Reload(config utils.ListenerConfig) error
func (*WSListener) Stop ¶
func (wl *WSListener) Stop() error
Click to show internal directories.
Click to hide internal directories.