Documentation
¶
Index ¶
- type DialParam
- type Dialer
- func (d *Dialer) AddBuf(buf []byte) int
- func (d *Dialer) Addr() string
- func (d *Dialer) BufLen() int
- func (d *Dialer) Close()
- func (d *Dialer) Flush() error
- func (d *Dialer) GetID() uint64
- func (d *Dialer) LastFlush() int64
- func (d *Dialer) SetWatcher(watch IDialWatch)
- func (d *Dialer) Underlying() connection.EngineConn
- type DialerMng
- type DialerStatus
- type EVEndpoint
- type EvConfig
- type IDialWatch
- type LoadBalance
- type Server
- func (s *Server) AddDialer(para *DialParam, max int)
- func (s *Server) Close(d *Dialer)
- func (s *Server) DialerUpdate(op, key, addr string)
- func (s *Server) GetDials() int32
- func (s *Server) GetListenAddrs() []net.Addr
- func (s *Server) GetLoad() int32
- func (s *Server) GetWorkerNum() int
- func (s *Server) Lookup(id uint64) *Dialer
- func (s *Server) SelectLoop(id int) eventloop.IEVLoop
- func (s *Server) Stop()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dialer ¶
type Dialer struct {
// contains filtered or unexported fields
}
func (*Dialer) SetWatcher ¶
func (d *Dialer) SetWatcher(watch IDialWatch)
func (*Dialer) Underlying ¶
func (d *Dialer) Underlying() connection.EngineConn
type DialerStatus ¶
type DialerStatus struct {
// contains filtered or unexported fields
}
type EVEndpoint ¶
func (*EVEndpoint) GetContext ¶
func (ep *EVEndpoint) GetContext() interface{}
func (*EVEndpoint) IsReuse ¶
func (ep *EVEndpoint) IsReuse() bool
func (*EVEndpoint) Network ¶
func (ep *EVEndpoint) Network() string
func (*EVEndpoint) String ¶
func (ep *EVEndpoint) String() string
type EvConfig ¶
type EvConfig struct {
Ncpu int `json:"ncpu"`
LbStrategy string `json:"lbStrategy"`
SslPem string `json:"sslPem"`
SslKey string `json:"sslKey"`
SslOcspStaple string `json:"sslOcspStaple"`
SslMode string `json:"sslMode"`
TlsEngine string `json:"tlsEngine"`
KTLSPolicy string `json:"ktlsPolicy"`
TlsMinVersion uint16 `json:"tlsMinVersion"`
TlsMaxVersion uint16 `json:"tlsMaxVersion"`
TlsNextProtos []string `json:"tlsNextProtos"`
TlsSessionTicketsDisabled bool `json:"tlsSessionTicketsDisabled"`
TlsSessionTicketSeed string `json:"tlsSessionTicketSeed"`
TlsSessionTicketContext string `json:"tlsSessionTicketContext"`
ListenAddrs []eventloop.IEVEndpoint `json:"listenAddrs"`
PollWait int `json:"pollWait"`
TwInterval int `json:"twInterval"`
DialKeepAlive bool `json:"dialKeepAlive"`
DialPolling bool `json:"dialPolling"`
PktSizeLimit int `json:"pktSizeLimit"`
BufSize int `json:"bufSize"`
ChanSize int `json:"chanSize"`
MaxAcceptFD int `json:"maxAcceptFD"`
IdleCheckInt int `json:"idleCheckInt"`
IdleLimit int `json:"idleLimit"`
CliSendBufLimit int `json:"cliSbufLimit"`
PrintStat bool `json:"printStat"`
IDGen eventloop.IDGenerator
}
func GetDefaultConfig ¶
func GetDefaultConfig() *EvConfig
type IDialWatch ¶
type IDialWatch interface {
OnUpdate(bool)
}
type LoadBalance ¶
type LoadBalance int
LoadBalance sets the load balancing method.
const ( // RoundRobin requests that connections are distributed to a loop in a // round-robin fashion. RoundRobin LoadBalance = iota // Random requests that connections are randomly distributed. Random // LeastConnections assigns the next accepted connection to the loop with // the least number of active connections. LeastConnections Hash )
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func Serve ¶
Serve starts handling events for the specified addresses.
Addresses should use a scheme prefix and be formatted like `tcp://192.168.0.10:9851`.
Only the "tcp" network scheme is supported.
func ServeByConfig ¶
func (*Server) DialerUpdate ¶
func (*Server) GetListenAddrs ¶
func (*Server) GetWorkerNum ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.