Documentation ¶
Index ¶
Constants ¶
View Source
const ( CfgParamCoreAPI = "CoreAPI" CfgParamCoreXPXNode = "XPXNode" CfgParamNetworkType = "networkType" )
congig params in restMux
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Access ¶ added in v1.0.11512
type Access interface {
Allow(ctx *fasthttp.RequestCtx, addr string) bool
}
type AccessConf ¶ added in v1.0.14
type AccessConf struct { ChkConn bool `yaml:"ChkConn"` AllowIP []string `yaml:"Allow"` DenyIP []string `yaml:"Deny"` Mess string `yaml:"Mess"` AllowRoute []string `yaml:"AllowRoute"` DenyRoute []string `yaml:"DenyRoute"` }
func (*AccessConf) Allow ¶ added in v1.0.14
func (cfg *AccessConf) Allow(ctx *fasthttp.RequestCtx, addr string) bool
func (*AccessConf) Deny ¶ added in v1.0.14
func (cfg *AccessConf) Deny(ctx *fasthttp.RequestCtx, addr string) bool
func (*AccessConf) IsAccess ¶ added in v1.0.11512
func (cfg *AccessConf) IsAccess() bool
type CfgHttp ¶
type CfgHttp struct { *AccessConf `yaml:"Access"json:"access,omitempty"` Domains map[string]string `yaml:"Domains,omitempty"json:"Domains,omitempty"` KillSignal int `yaml:"KillSignal"json:"KillSignal,omitempty"` Server *fasthttp.Server `json:"-"yaml:"Server,omitempty"` // contains filtered or unexported fields }
CfgHttp has some options for Acceptor work
func NewCfgHttp ¶
NewCfgHttp create CfgHttp from config file
Click to show internal directories.
Click to hide internal directories.