Documentation ¶
Index ¶
- Constants
- func ConfModTcpKeepAliveCheck(cfg *ConfModTcpKeepAlive, confRoot string) error
- func ProductRuleDataCheck(conf ProductRuleData) error
- func ProductRulesCheck(conf ProductRules) error
- func RulesCheck(conf KeepAliveRules) error
- type ConfModTcpKeepAlive
- type KeepAliveParam
- type KeepAliveRules
- type KeepAliveTable
- type ModuleTcpKeepAlive
- type ModuleTcpKeepAliveState
- type ProductRuleConf
- type ProductRuleData
- type ProductRuleFile
- type ProductRules
- type ProductRulesFile
Constants ¶
View Source
const (
ModTcpKeepAlive = "mod_tcp_keepalive"
)
Variables ¶
This section is empty.
Functions ¶
func ConfModTcpKeepAliveCheck ¶
func ConfModTcpKeepAliveCheck(cfg *ConfModTcpKeepAlive, confRoot string) error
func ProductRuleDataCheck ¶
func ProductRuleDataCheck(conf ProductRuleData) error
func ProductRulesCheck ¶
func ProductRulesCheck(conf ProductRules) error
func RulesCheck ¶
func RulesCheck(conf KeepAliveRules) error
Types ¶
type ConfModTcpKeepAlive ¶
type ConfModTcpKeepAlive struct { Basic struct { DataPath string // path of product keepalive rule data } Log struct { OpenDebug bool // whether open debug } }
func (*ConfModTcpKeepAlive) Check ¶
func (cfg *ConfModTcpKeepAlive) Check(confRoot string) error
type KeepAliveParam ¶
type KeepAliveParam struct { Disable bool // close the TCP-KeepAlive heartbeat message sending strategy KeepIdle int // period to send heartbeat message since there is no data transport in tcp connection KeepIntvl int // period to send heartbeat message again when last message is not applied KeepCnt int // count to resend heartbeat message when last message is not applied }
type KeepAliveRules ¶
type KeepAliveRules map[string]KeepAliveParam
type KeepAliveTable ¶
type KeepAliveTable struct {
// contains filtered or unexported fields
}
func NewKeepAliveTable ¶
func NewKeepAliveTable() *KeepAliveTable
func (*KeepAliveTable) Search ¶
func (t *KeepAliveTable) Search(product string) (KeepAliveRules, bool)
func (*KeepAliveTable) Update ¶
func (t *KeepAliveTable) Update(data ProductRuleData)
type ModuleTcpKeepAlive ¶
type ModuleTcpKeepAlive struct {
// contains filtered or unexported fields
}
func NewModuleTcpKeepAlive ¶
func NewModuleTcpKeepAlive() *ModuleTcpKeepAlive
func (*ModuleTcpKeepAlive) HandleAccept ¶
func (m *ModuleTcpKeepAlive) HandleAccept(session *bfe_basic.Session) int
func (*ModuleTcpKeepAlive) Init ¶
func (m *ModuleTcpKeepAlive) Init(cbs *bfe_module.BfeCallbacks, whs *web_monitor.WebHandlers, cr string) error
func (*ModuleTcpKeepAlive) Name ¶
func (m *ModuleTcpKeepAlive) Name() string
type ModuleTcpKeepAliveState ¶
type ModuleTcpKeepAliveState struct { ConnToSet *metrics.Counter // connection hit rule, to set or disable keeplaive ConnSetKeepIdle *metrics.Counter // connection set keepalive idle ConnSetKeepIdleError *metrics.Counter // connection set keepalive idle error ConnSetKeepIntvl *metrics.Counter // connection set keepalive interval ConnSetKeepIntvlError *metrics.Counter // connection set keepalive interval error ConnSetKeepCnt *metrics.Counter // connection set keepalive retry count ConnSetKeepCntError *metrics.Counter // connection set keepalive retry count error ConnDisableKeepAlive *metrics.Counter // connection disable keepalive message ConnDisableKeepAliveError *metrics.Counter // connection disable keepalive error ConnConvertToTcpConnError *metrics.Counter // connection convert to TCPConn error }
type ProductRuleConf ¶
type ProductRuleConf struct { Version string Config map[string]ProductRulesFile }
type ProductRuleData ¶
type ProductRuleData struct { Version string Config ProductRules }
func ConvertConf ¶
func ConvertConf(c ProductRuleConf) (ProductRuleData, error)
func KeepAliveDataLoad ¶
func KeepAliveDataLoad(filename string) (ProductRuleData, error)
type ProductRuleFile ¶
type ProductRuleFile struct { VipConf []string KeepAliveParam KeepAliveParam }
type ProductRules ¶
type ProductRules map[string]KeepAliveRules
type ProductRulesFile ¶
type ProductRulesFile []ProductRuleFile
Click to show internal directories.
Click to hide internal directories.