Documentation ¶
Index ¶
- Constants
- Variables
- func OverLoad(file string) error
- type Auth
- type Browser
- type CMS
- type Component
- type ComponentDef
- type ComponentList
- type Compress
- type ConfigDef
- func (c *ConfigDef) GetHost(id string) *Host
- func (c *ConfigDef) GetListener(host string, port string, secure bool) (*Host, *Listener)
- func (c *ConfigDef) IsComponentLoaded(name string) bool
- func (c *ConfigDef) Load(file string) error
- func (c *ConfigDef) SearchListener(name string) *Listener
- func (c *ConfigDef) SysLoad(file string) error
- type Engine
- type EngineList
- type Error
- type FileServer
- type Host
- type HostList
- type Listener
- type ListenerList
- type Log
- type Minify
- type Origin
- type Plugin
- type Plugins
- type Prot
- type Redirect
- type Stat
- type TComponentList
- type TEngineList
- type THost
- type THostList
- type TListenerList
- type User
- type UserAgent
Constants ¶
const ( PROTOCOL_HTTP = "http" PROTOCOL_HTTPS = "https" PROTOCOL_gRPC = "grpc" PROTOCOL_gRPCS = "grpcs" )
Variables ¶
var Config = &ConfigDef{}
Functions ¶
func OverLoad ¶ added in v1.5.1
Overload will load the new config and add, modify, remove hosts and components config - Listeners, engines and list of components are not supported for now - Certificates will NOT be reloaded if any change.for now - Plugins are not modified for now - Logs are not rebuild for now What is working: + changes of listeners of host ( if they are already loaded ) + changes of hostnames + changes of every components config + changes of logs format What to do: * If new host and/or new certificates, rebuild Listener with certificates, restart listener * If new listener, start listener * If del listener, stop listener * If modif listener, stop/start listener LET THE ONGOING REQUESTS FINISH TO SERVER before restart ???? * Load new plugins * Load new Engines * Load new components, rebuild encapsulate handlers on listeners
Types ¶
type ComponentDef ¶
type ComponentList ¶
type ComponentList []Component
func (*ComponentList) Exists ¶
func (ccl *ComponentList) Exists(compcc Component) bool
func (*ComponentList) UnmarshalJSON ¶
func (ccl *ComponentList) UnmarshalJSON(buf []byte) error
type ConfigDef ¶
type ConfigDef struct { Version string File string PluginPrefix string `json:"pluginprefix"` Listeners ListenerList `json:"listeners"` Hosts HostList `json:"hosts"` Components ComponentList `json:"components"` Engines EngineList `json:"engines"` Log Log `json:"log"` Include []string `json:"include"` }
func (*ConfigDef) GetListener ¶
func (*ConfigDef) IsComponentLoaded ¶
func (*ConfigDef) SearchListener ¶
type EngineList ¶
type EngineList []Engine
func (*EngineList) Exists ¶
func (ecl *EngineList) Exists(compec Engine) bool
func (*EngineList) UnmarshalJSON ¶
func (ecl *EngineList) UnmarshalJSON(buf []byte) error
type FileServer ¶
type Host ¶
type Host struct { Name string `json:"name"` Listeners []string `json:"listeners"` HostNames []string `json:"hostnames"` Cert string `json:"cert"` PrivateKey string `json:"key"` Debug bool `json:"debug"` Plugins Plugins `json:"plugins"` Log Log `json:"log"` // Build after Status int // BUILT-IN Components Stat Stat `json:"stat"` Redirect Redirect `json:"redirect"` Auth Auth `json:"auth"` Prot Prot `json:"prot"` Compress Compress `json:"compress"` Minify Minify `json:"minify"` Origin Origin `json:"origin"` FileServer FileServer `json:"fileserver"` CMS CMS `json:"cms"` Error Error `json:"error"` // External components Remaining []byte Components map[string]*ComponentDef }
func (*Host) UnmarshalJSON ¶
type ListenerList ¶
type ListenerList []Listener
func (*ListenerList) Exists ¶
func (lcl *ListenerList) Exists(complc Listener) bool
func (*ListenerList) UnmarshalJSON ¶
func (lcl *ListenerList) UnmarshalJSON(buf []byte) error
type TComponentList ¶
type TComponentList []Component
type TEngineList ¶
type TEngineList []Engine
type TListenerList ¶
type TListenerList []Listener