blob: 5f7cc5631632e21c0646a8b5f5b8e9d7740754d0 [file] [log] [blame]
Serge Bazanskia758ef52018-10-06 17:54:25 +01001package state
2
3import (
4 pb "code.hackerspace.pl/q3k/topo/proto/control"
5)
6
7type SwitchportState struct {
8 Proto *pb.SwitchPort
9}
10
11type SwitchState struct {
12 Name string
13 Ports []*SwitchportState
14}
15
16type StateManager struct {
17 Switches map[string]*SwitchState
18}
19
20func NewManager() *StateManager {
21 return &StateManager{
22 Switches: make(map[string]*SwitchState),
23 }
24}