summaryrefslogtreecommitdiffhomepage
path: root/cmd
diff options
context:
space:
mode:
authorCarl Baldwin <carl@ecbaldwin.net>2019-07-24 09:02:06 -0600
committerFUJITA Tomonori <fujita.tomonori@gmail.com>2019-08-28 09:06:20 +0900
commite88cfd44d75e7eec6a9bd1e289496afae504549d (patch)
tree7065fe8954770a9222c9c3e65c836bd98f2ce5d2 /cmd
parentb480c15a9c4b2be41439e3648cb0701963d8efbf (diff)
config -> internal_config
Diffstat (limited to 'cmd')
-rw-r--r--cmd/gobgpd/main.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/cmd/gobgpd/main.go b/cmd/gobgpd/main.go
index a1351ff1..c33a3593 100644
--- a/cmd/gobgpd/main.go
+++ b/cmd/gobgpd/main.go
@@ -35,9 +35,9 @@ import (
"google.golang.org/grpc/credentials"
api "github.com/osrg/gobgp/api"
- "github.com/osrg/gobgp/internal/pkg/config"
+ internal_cfg "github.com/osrg/gobgp/internal/pkg/config"
"github.com/osrg/gobgp/internal/pkg/version"
- config_api "github.com/osrg/gobgp/pkg/config"
+ "github.com/osrg/gobgp/pkg/config"
"github.com/osrg/gobgp/pkg/server"
)
@@ -122,9 +122,9 @@ func main() {
log.SetFormatter(&log.JSONFormatter{})
}
- configCh := make(chan *config.BgpConfigSet)
+ configCh := make(chan *internal_cfg.BgpConfigSet)
if opts.Dry {
- go config.ReadConfigfileServe(opts.ConfigFile, opts.ConfigType, configCh)
+ go internal_cfg.ReadConfigfileServe(opts.ConfigFile, opts.ConfigType, configCh)
c := <-configCh
if opts.LogLevel == "debug" {
pretty.Println(c)
@@ -157,20 +157,20 @@ func main() {
}
if opts.ConfigFile != "" {
- go config.ReadConfigfileServe(opts.ConfigFile, opts.ConfigType, configCh)
+ go internal_cfg.ReadConfigfileServe(opts.ConfigFile, opts.ConfigType, configCh)
}
loop := func() {
- var c *config.BgpConfigSet
+ var c *internal_cfg.BgpConfigSet
initialConfig := <-configCh
- c = config_api.ApplyInitialConfig(bgpServer, initialConfig, opts.GracefulRestart)
+ c = config.ApplyInitialConfig(bgpServer, initialConfig, opts.GracefulRestart)
for {
select {
case <-sigCh:
stopServer(bgpServer, opts.UseSdNotify)
return
case newConfig := <-configCh:
- c = config_api.UpdateConfig(bgpServer, c, newConfig)
+ c = config.UpdateConfig(bgpServer, c, newConfig)
}
}
}