Documentation ¶
Index ¶
- Variables
- func GetInheritListeners() ([]net.Listener, net.Conn, error)
- func InitDefaultLogger(config *Config)
- func ListListenersFile() []*os.File
- func Milliseconds(d time.Duration) int64
- func NewHandler(clusterManagerFilter types.ClusterManagerFilter, clMng types.ClusterManager) types.ConnectionHandler
- func ReconfigureHandler()
- func ResetAdapter()
- func Stop()
- func StopAccept()
- func StopConnection()
- func StopReconfigureHandler()
- func WaitConnectionsDone(duration time.Duration)
- type Config
- type ListenerAdapter
- func (adapter *ListenerAdapter) AddOrUpdateListener(serverName string, lc *v2.Listener) error
- func (adapter *ListenerAdapter) DeleteListener(serverName string, listenerName string) error
- func (adapter *ListenerAdapter) FindListenerByName(serverName string, listenerName string) types.Listener
- func (adapter *ListenerAdapter) UpdateListenerTLS(serverName string, listenerName string, inspector bool, ...) error
- type Server
Constants ¶
This section is empty.
Variables ¶
View Source
var GracefulTimeout = time.Second * 30 //default 30s
Functions ¶
func InitDefaultLogger ¶
func InitDefaultLogger(config *Config)
InitDefaultLogger init default logger
func ListListenersFile ¶
ListListenersFile returns all server listener's fds
func Milliseconds ¶ added in v0.14.0
compatible with go 1.12.x
func NewHandler ¶
func NewHandler(clusterManagerFilter types.ClusterManagerFilter, clMng types.ClusterManager) types.ConnectionHandler
NewHandler create types.ConnectionHandler's implement connHandler with cluster manager and logger
func ReconfigureHandler ¶
func ReconfigureHandler()
func StopReconfigureHandler ¶
func StopReconfigureHandler()
func WaitConnectionsDone ¶
WaitConnectionsDone Wait for all connections to be finished
Types ¶
type Config ¶
type ListenerAdapter ¶
type ListenerAdapter struct {
// contains filtered or unexported fields
}
func GetListenerAdapterInstance ¶
func GetListenerAdapterInstance() *ListenerAdapter
func (*ListenerAdapter) AddOrUpdateListener ¶
func (adapter *ListenerAdapter) AddOrUpdateListener(serverName string, lc *v2.Listener) error
AddOrUpdateListener used to: Add and start listener when listener doesn't exist Update listener when listener already exist
func (*ListenerAdapter) DeleteListener ¶
func (adapter *ListenerAdapter) DeleteListener(serverName string, listenerName string) error
func (*ListenerAdapter) FindListenerByName ¶
func (adapter *ListenerAdapter) FindListenerByName(serverName string, listenerName string) types.Listener
FindListenerByName
func (*ListenerAdapter) UpdateListenerTLS ¶
type Server ¶
type Server interface { AddListener(lc *v2.Listener) (types.ListenerEventListener, error) Start() Restart() Close() Handler() types.ConnectionHandler }
func NewServer ¶
func NewServer(config *Config, cmFilter types.ClusterManagerFilter, clMng types.ClusterManager) Server
NewServer get a new server
Source Files ¶
Click to show internal directories.
Click to hide internal directories.