Files
openlan/cmd/switch/main.go
Daniel Ding 6733a719e0
Some checks are pending
Coverage CI / build (push) Waiting to run
CodeQL / Analyze (go) (push) Waiting to run
Ubuntu CI / build (push) Waiting to run
fea: add user for http proxy.
2025-01-01 11:17:02 +08:00

24 lines
432 B
Go
Executable File

package main
import (
"github.com/luscis/openlan/pkg/cache"
"github.com/luscis/openlan/pkg/config"
"github.com/luscis/openlan/pkg/libol"
cswitch "github.com/luscis/openlan/pkg/switch"
)
func main() {
c := config.NewSwitch()
config.Update(c)
libol.SetLogger(c.Log.File, c.Log.Verbose)
cache.Init(&c.Perf)
s := cswitch.NewSwitch(c)
libol.PreNotify()
s.Initialize()
s.Start()
libol.SdNotify()
libol.Wait()
s.Stop()
}