Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type STPConfig ¶
type STPConfig struct { Msgtype STPConfigMsgType Msgdata interface{} }
type STPConfigMsgType ¶
type STPConfigMsgType int8
const ( STPConfigMsgCreateBridge STPConfigMsgType = iota + 1 STPConfigMsgDeleteBridge STPConfigMsgUpdateBridgeMaxAge STPConfigMsgUpdateBridgeHelloTime STPConfigMsgUpdateBridgeForwardDelay STPConfigMsgUpdateBridgeTxHoldCount STPConfigMsgUpdateBridgePriority STPConfigMsgUpdateBridgeForceVersion STPConfigMsgUpdateBridgeDebugLevel STPConfigMsgCreatePort STPConfigMsgDeletePort STPConfigMsgUpdatePortPriority STPConfigMsgUpdatePortEnable STPConfigMsgUpdatePortPathCost STPConfigMsgUpdatePortProtocolMigration STPConfigMsgUpdatePortAdminPointToPoint STPConfigMsgUpdatePortAdminEdge STPConfigMsgUpdatePortAdminPathCost STPConfigMsgUpdatePortBpduGuard STPConfigMsgUpdatePortBridgeAssurance STPConfigMsgGlobalEnable STPConfigMsgGlobalDisable )
type STPServer ¶
type STPServer struct { ConfigCh chan STPConfig AsicdSubSocketCh chan commonDefs.AsicdNotifyMsg // contains filtered or unexported fields }
func NewSTPServer ¶
func (*STPServer) InitServer ¶
func (server *STPServer) InitServer()
func (*STPServer) StartSTPSConfigNotificationListener ¶
func (server *STPServer) StartSTPSConfigNotificationListener()
TODO
func (server *STPServer) ListenToClientStateChanges() { clientStatusListener := keepalive.InitDaemonStatusListener() if clientStatusListener != nil { go clientStatusListener.StartDaemonStatusListner() for { select { case clientStatus := <-clientStatusListener.DaemonStatusCh: mgr.logger.Info(fmt.Sprintln("Received client status: ", clientStatus.Name, clientStatus.Status)) if mgr.IsReady() { switch clientStatus.Status { case sysdCommonDefs.STOPPED, sysdCommonDefs.RESTARTING: go mgr.DisconnectFromClient(clientStatus.Name) case sysdCommonDefs.UP: go mgr.ConnectToClient(clientStatus.Name) } } } } } }
StartSTPSConfigNotificationListener
Click to show internal directories.
Click to hide internal directories.