Documentation
¶
Index ¶
Constants ¶
View Source
const ( PKG_LESS = iota PKG_FULL PKG_ERR )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CltProtocol ¶
type Logger ¶
type Logger interface {
Debug(msg ...interface{})
Info(msg ...interface{})
Warn(msg ...interface{})
Error(msg ...interface{})
Debugf(tpl string, args ...interface{})
Infof(tpl string, args ...interface{})
Warnf(tpl string, args ...interface{})
Errorf(tpl string, args ...interface{})
}
var OLOG Logger
type OneClt ¶
type OneClt struct {
Proto CltProtocol
// contains filtered or unexported fields
}
func NewOneClt ¶
func NewOneClt(cp CltProtocol, logger Logger, conf *OneCltConf) *OneClt
func (*OneClt) GetConf ¶
func (c *OneClt) GetConf() *OneCltConf
type OneCltConf ¶
type OneCltConf struct {
Address string
Balance string `yaml:"balance"`
TransProtocol string `yaml:"trans_protocol"`
QueueCap int `yaml:"queue_cap"`
DialTimeout time.Duration `yaml:"dial_timeout"`
ReadTimeout time.Duration `yaml:"read_timeout"`
WriteTimeout time.Duration `yaml:"write_timeout"`
IdleTimeout time.Duration `yaml:"idle_timeout"`
}
type OneHandler ¶
type OneSvr ¶
type OneSvr struct {
// contains filtered or unexported fields
}
func NewOneSvr ¶
func NewOneSvr(sp SvrProtocol, logger Logger, conf *OneSvrConf) *OneSvr
func (*OneSvr) GetConf ¶
func (s *OneSvr) GetConf() *OneSvrConf
type OneSvrConf ¶
type OneSvrConf struct {
Address string `yaml:"address"`
Protocol string `yaml:"protocol"`
MaxInvoke int `yaml:"max_invoke"`
QueueCap int `yaml:"queue_cap"`
AcceptTimeout time.Duration `yaml:"accept_timeout"`
ReadTimeout time.Duration
WriteTimeout time.Duration
HandleTimeout time.Duration
IdleTimeout time.Duration
TCPReadBuf int
TCPWriteBuf int
TCPNoDelay bool
ServiceWeight int `yaml:"service_weight"`
}
Click to show internal directories.
Click to hide internal directories.