mirror of
https://github.com/luscis/openlan.git
synced 2025-12-24 11:10:54 +08:00
23 lines
304 B
Go
Executable File
23 lines
304 B
Go
Executable File
package config
|
|
|
|
type manager struct {
|
|
Switch *Switch
|
|
}
|
|
|
|
var Manager = manager{
|
|
Switch: &Switch{},
|
|
}
|
|
|
|
func GetNetwork(name string) *Network {
|
|
for _, network := range Manager.Switch.Network {
|
|
if network.Name == name {
|
|
return network
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func Reload() {
|
|
Manager.Switch.Reload()
|
|
}
|