Versions in this module Expand all Collapse all v0 v0.2.4 Apr 29, 2021 Changes in this version + type Handler interface + OnConnect func(c *connection.Connection) + type LoadBalanceStrategy func([]*eventloop.EventLoop) *eventloop.EventLoop + func LeastConnection() LoadBalanceStrategy + func RoundRobin() LoadBalanceStrategy + type Option func(*Options) + func Address(a string) Option + func IdleTime(t time.Duration) Option + func LoadBalance(strategy LoadBalanceStrategy) Option + func MetricsServer(path, address string) Option + func Network(n string) Option + func NumLoops(n int) Option + func Protocol(p connection.Protocol) Option + func ReusePort(reusePort bool) Option + type Options struct + Address string + IdleTime time.Duration + Network string + NumLoops int + Protocol connection.Protocol + ReusePort bool + Strategy LoadBalanceStrategy + type Server struct + func NewServer(handler Handler, opts ...Option) (server *Server, err error) + func (s *Server) Options() Options + func (s *Server) RunAfter(d time.Duration, f func()) *timingwheel.Timer + func (s *Server) RunEvery(d time.Duration, f func()) *timingwheel.Timer + func (s *Server) Start() + func (s *Server) Stop()