Documentation ¶
Overview ¶
Copyright [2016] [SnapRoute Inc]
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
_______ __ __________ ___ _______.____ __ ____ __ .___________. ______ __ __ | ____|| | | ____\ \ / / / |\ \ / \ / / | | | | / || | | | | |__ | | | |__ \ V / | (----` \ \/ \/ / | | `---| |----`| ,----'| |__| | | __| | | | __| > < \ \ \ / | | | | | | | __ | | | | `----.| |____ / . \ .----) | \ /\ / | | | | | `----.| | | | |__| |_______||_______/__/ \__\ |_______/ \__/ \__/ |__| |__| \______||__| |__|
defs
Copyright [2016] [SnapRoute Inc]
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
_______ __ __________ ___ _______.____ __ ____ __ .___________. ______ __ __ | ____|| | | ____\ \ / / / |\ \ / \ / / | | | | / || | | | | |__ | | | |__ \ V / | (----` \ \/ \/ / | | `---| |----`| ,----'| |__| | | __| | | | __| > < \ \ \ / | | | | | | | __ | | | | `----.| |____ / . \ .----) | \ /\ / | | | | | `----.| | | | |__| |_______||_______/__/ \__\ |_______/ \__/ \__/ |__| |__| \______||__| |__|
global.go
init
loggger
portmap
Index ¶
- Constants
- Variables
- func AddAggConfigMap(ifindex int32, intfref string)
- func ConstructPortConfigMap()
- func CreateEventMap(ifindex int32)
- func DelAggConfigMap(ifindex int32, intfref string)
- func DeleteAllAsicDPlugins()
- func DeleteEventMap(ifindex int32)
- func GetAggIfIndexFromName(name string) int32
- func GetAggNameFromIfIndex(ifindex int32) string
- func GetAsicDPluginList() []asicdClient.AsicdClientIntf
- func GetIfIndexFromName(name string) int32
- func GetLaLogger() *logging.Writer
- func GetNameFromIfIndex(ifindex int32) string
- func GetSwitchMac() [6]uint8
- func LacpGlobalStateGet() int
- func LacpGlobalStateSet(state int)
- func ProcessLacpGroupOperStateDown(ifindex int32)
- func ProcessLacpGroupOperStateUp(ifindex int32)
- func ProcessLacpPortOperStateDown(ifindex int32)
- func ProcessLacpPortOperStateUp(ifindex int32)
- func ProcessLacpPortPartnerInfoMismatch(ifindex int32)
- func ProcessLacpPortPartnerInfoSync(ifindex int32)
- func SaveSwitchMac(switchMac string)
- func SendResponse(msg string, responseChan chan string)
- func SetAsicDPlugin(clientif asicdClient.AsicdClientIntf)
- func SetLaLogger(logger *logging.Writer)
- type MachineEvent
- type PortConfig
- type StateEvent
- func (se *StateEvent) CurrentEvent() fsm.Event
- func (se *StateEvent) CurrentState() fsm.State
- func (se *StateEvent) EnableLogging(ena bool)
- func (se *StateEvent) IsLoggerEna() bool
- func (se *StateEvent) LoggerSet(log func(string))
- func (se *StateEvent) PreviousEvent() fsm.Event
- func (se *StateEvent) PreviousState() fsm.State
- func (se *StateEvent) SetEvent(es string, e fsm.Event)
- func (se *StateEvent) SetState(s fsm.State)
- func (se *StateEvent) StateStrMapSet(strMap map[fsm.State]string)
Constants ¶
const ( // init LACP_GLOBAL_INIT = iota + 1 // allow all config LACP_GLOBAL_ENABLE // disallow all config LACP_GLOBAL_DISABLE // transition state to to allow deleting on // when global state changes to disable LACP_GLOBAL_DISABLE_PENDING )
Variables ¶
var AggConfigMap map[int32]string
var ClientIntfs []asicdClient.AsicdClientIntf
var EventMap map[ifindex_event]bool
events will hold negitive events and will be cleared
var GlobalLogger *logging.Writer
var LaSwitchMac [6]uint8
var LacpGlobalState int = LACP_GLOBAL_INIT
var PortConfigMap map[int32]PortConfig
Functions ¶
func AddAggConfigMap ¶
func ConstructPortConfigMap ¶
func ConstructPortConfigMap()
func CreateEventMap ¶
func CreateEventMap(ifindex int32)
func DelAggConfigMap ¶
func DeleteAllAsicDPlugins ¶
func DeleteAllAsicDPlugins()
func DeleteEventMap ¶
func DeleteEventMap(ifindex int32)
func GetAggIfIndexFromName ¶
func GetAggNameFromIfIndex ¶
func GetAsicDPluginList ¶
func GetAsicDPluginList() []asicdClient.AsicdClientIntf
func GetIfIndexFromName ¶
func GetLaLogger ¶
func GetNameFromIfIndex ¶
func GetSwitchMac ¶
func GetSwitchMac() [6]uint8
func LacpGlobalStateGet ¶
func LacpGlobalStateGet() int
func LacpGlobalStateSet ¶
func LacpGlobalStateSet(state int)
func ProcessLacpGroupOperStateDown ¶
func ProcessLacpGroupOperStateDown(ifindex int32)
func ProcessLacpGroupOperStateUp ¶
func ProcessLacpGroupOperStateUp(ifindex int32)
func ProcessLacpPortOperStateDown ¶
func ProcessLacpPortOperStateDown(ifindex int32)
func ProcessLacpPortOperStateUp ¶
func ProcessLacpPortOperStateUp(ifindex int32)
func ProcessLacpPortPartnerInfoMismatch ¶
func ProcessLacpPortPartnerInfoMismatch(ifindex int32)
func ProcessLacpPortPartnerInfoSync ¶
func ProcessLacpPortPartnerInfoSync(ifindex int32)
func SaveSwitchMac ¶
func SaveSwitchMac(switchMac string)
func SendResponse ¶
func SetAsicDPlugin ¶
func SetAsicDPlugin(clientif asicdClient.AsicdClientIntf)
Types ¶
type MachineEvent ¶
MachineEvent machine events will be sent with this struct and will provide extra data in order to provide async communication between sender and receiver
type PortConfig ¶
type StateEvent ¶
type StateEvent struct { Owner string StrStateMap map[fsm.State]string LogEna bool Logger func(string) // contains filtered or unexported fields }
func (*StateEvent) CurrentEvent ¶
func (se *StateEvent) CurrentEvent() fsm.Event
func (*StateEvent) CurrentState ¶
func (se *StateEvent) CurrentState() fsm.State
func (*StateEvent) EnableLogging ¶
func (se *StateEvent) EnableLogging(ena bool)
func (*StateEvent) IsLoggerEna ¶
func (se *StateEvent) IsLoggerEna() bool
func (*StateEvent) LoggerSet ¶
func (se *StateEvent) LoggerSet(log func(string))
func (*StateEvent) PreviousEvent ¶
func (se *StateEvent) PreviousEvent() fsm.Event
func (*StateEvent) PreviousState ¶
func (se *StateEvent) PreviousState() fsm.State
func (*StateEvent) SetState ¶
func (se *StateEvent) SetState(s fsm.State)
func (*StateEvent) StateStrMapSet ¶
func (se *StateEvent) StateStrMapSet(strMap map[fsm.State]string)