package state | |
import ( | |
pb "code.hackerspace.pl/q3k/topo/proto/control" | |
) | |
type SwitchportState struct { | |
Proto *pb.SwitchPort | |
} | |
type SwitchState struct { | |
Name string | |
Ports []*SwitchportState | |
} | |
type StateManager struct { | |
Switches map[string]*SwitchState | |
} | |
func NewManager() *StateManager { | |
return &StateManager{ | |
Switches: make(map[string]*SwitchState), | |
} | |
} |