server

package
v0.0.0-...-a4e6d7a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 5, 2017 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LAConfig

type LAConfig struct {
	Msgtype LaConfigMsgType
	Msgdata interface{}
}

type LAServer

type LAServer struct {
	ConfigCh         chan LAConfig
	AsicdSubSocketCh chan commonDefs.AsicdNotifyMsg
	// contains filtered or unexported fields
}

func NewLAServer

func NewLAServer(logger *logging.Writer) *LAServer

func (*LAServer) InitServer

func (server *LAServer) InitServer()

func (*LAServer) StartLaConfigNotificationListener

func (s *LAServer) StartLaConfigNotificationListener()

TODO

func (server *LAServer) ListenToClientStateChanges() {
	clientStatusListener := keepalive.InitDaemonStatusListener()
	if clientStatusListener != nil {
		go clientStatusListener.StartDaemonStatusListner()
		for {
			select {
			case clientStatus := <-clientStatusListener.DaemonStatusCh:
				svr.logger.Info(fmt.Sprintln("Received client status: ", clientStatus.Name, clientStatus.Status))
				if svr.IsReady() {
					switch clientStatus.Status {
					case sysdCommonDefs.STOPPED, sysdCommonDefs.RESTARTING:
						go svr.DisconnectFromClient(clientStatus.Name)
					case sysdCommonDefs.UP:
						go svr.ConnectToClient(clientStatus.Name)
					}
				}
			}
		}
	}
}

StartSTPSConfigNotificationListener

type LaConfigMsgType

type LaConfigMsgType int8
const (
	LAConfigMsgCreateLaPortChannel LaConfigMsgType = iota + 1
	LAConfigMsgDeleteLaPortChannel
	LAConfigMsgUpdateLaPortChannelLagHash
	LAConfigMsgUpdateLaPortChannelSystemIdMac
	LAConfigMsgUpdateLaPortChannelSystemPriority
	LAConfigMsgUpdateLaPortChannelLagType
	LAConfigMsgUpdateLaPortChannelAdminState
	LAConfigMsgUpdateLaPortChannelAggMode
	LAConfigMsgUpdateLaPortChannelPeriod
	LAConfigMsgCreateLaAggPort
	LAConfigMsgDeleteLaAggPort
	LAConfigMsgUpdateLaAggPortAdminState
	LAConfigMsgCreateDistributedRelay
	LAConfigMsgDeleteDistributedRelay
	LAConfigMsgAggregatorCreated
	LAConfigMsgCreateConversationId
	LAConfigMsgUpdateConversationId
	LAConfigMsgDeleteConversationId
	LAConfigMsgAddL3IntfType
	LAConfigMsgAddL2IntfType
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL