Documentation ¶
Index ¶
- Variables
- func EnableInheritOldMosnconfig(enable bool)
- func GetInheritConfig() (*v2.MOSNConfig, error)
- func GetInheritListeners() ([]net.Listener, []net.PacketConn, net.Conn, error)
- func InitDefaultLogger(config *Config)
- func IsReconfigure() bool
- func ListListenersFile() []*os.File
- func Milliseconds(d time.Duration) int64
- func NewHandler(clusterManagerFilter types.ClusterManagerFilter, clMng types.ClusterManager) types.ConnectionHandler
- func ReconfigureHandler() error
- func ReconfigureListener()
- func ResetAdapter()
- func SendInheritConfig() error
- func SetDrainTime(time time.Duration)
- func Stop()
- func StopConnection()
- func StopReconfigureHandler()
- func WaitConnectionsDone(duration time.Duration)
- type Config
- type ListenerAdapter
- type Server
Constants ¶
This section is empty.
Variables ¶
View Source
var (
GracefulTimeout = time.Second * 30 //default 30s
)
Functions ¶
func EnableInheritOldMosnconfig ¶ added in v0.20.0
func EnableInheritOldMosnconfig(enable bool)
func GetInheritConfig ¶ added in v0.20.0
func GetInheritConfig() (*v2.MOSNConfig, error)
func GetInheritListeners ¶
func InitDefaultLogger ¶
func InitDefaultLogger(config *Config)
InitDefaultLogger init default logger
func IsReconfigure ¶ added in v0.27.0
func IsReconfigure() bool
will notice the old mosn when the reconfigure.sock exists
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() error
stage manager will resume the current old mosn when return error
func ReconfigureListener ¶ added in v0.27.0
func ReconfigureListener()
func SendInheritConfig ¶ added in v0.20.0
func SendInheritConfig() error
SendInheritConfig send to new mosn using uinx dowmain socket
func SetDrainTime ¶ added in v0.27.0
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
type Server ¶
type Server interface { AddListener(lc *v2.Listener) (types.ListenerEventListener, error) Start() Restart() // Shutdown means graceful stop Shutdown() error 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.