Commit e30d8e60 authored by suyanlong's avatar suyanlong

rename manger to manager package

parent 88993240
......@@ -15,7 +15,7 @@ import (
"gitlab.33.cn/link33/sidecar/internal"
"gitlab.33.cn/link33/sidecar/internal/appchain"
"gitlab.33.cn/link33/sidecar/internal/loggers"
"gitlab.33.cn/link33/sidecar/internal/manger"
"gitlab.33.cn/link33/sidecar/internal/manager"
"gitlab.33.cn/link33/sidecar/internal/peermgr"
"gitlab.33.cn/link33/sidecar/internal/repo"
"gitlab.33.cn/link33/sidecar/internal/router"
......@@ -59,7 +59,7 @@ func NewSidecar(repoRoot string, config *repo.Config) (internal.Launcher, error)
pm, err := peermgr.New(config, r, nodePrivKey, privateKey, 1, loggers.Logger(loggers.PeerMgr))
tool.Asset(err)
clients := plugins.CreateClients(config.Appchains, nil)
persister := manger.NewPersister(addr.String(), store, loggers.Logger(loggers.Manger))
persister := manager.NewPersister(addr.String(), store, loggers.Logger(loggers.Manager))
appchainMgr := appchainmgr.New(persister)
// TODO hub client
// privateKey DH
......@@ -68,7 +68,7 @@ func NewSidecar(repoRoot string, config *repo.Config) (internal.Launcher, error)
r.Adds(clientPort)
rule, err := rulemgr.New(store, loggers.Logger(loggers.Rule))
tool.Asset(err)
mg, err := manger.NewManager(addr.String(), pm, appchainMgr, rule, loggers.Logger(loggers.Manger))
mg, err := manager.NewManager(addr.String(), pm, appchainMgr, rule, loggers.Logger(loggers.Manager))
tool.Asset(err)
apiServer := api.NewServer(config, r, loggers.Logger(loggers.ApiServer))
ctx, cancel := context.WithCancel(context.Background())
......
......@@ -34,7 +34,7 @@ func TestLogger(t *testing.T) {
api := Logger(ApiServer) // TODO
require.NotNil(t, api)
// api.Info("-------")
// mangerLoggerLevel := w.loggers[Manger].Logger.Level.String()
// mangerLoggerLevel := w.loggers[Manager].Logger.Level.String()
// t.Log(mangerLoggerLevel)
// require.Equal(t, config.Log.Module.Manger, mangerLoggerLevel)
// require.Equal(t, config.Log.Module.Manager, mangerLoggerLevel)
}
......@@ -18,7 +18,7 @@ const (
Router = "router"
Swarm = "swarm"
Syncer = "syncer"
Manger = "manger"
Manager = "manager"
Rule = "rule"
)
......@@ -50,8 +50,8 @@ func InitializeLogger(config *repo.Config) {
m[Syncer].Logger.SetLevel(log.ParseLevel(config.Log.Module.Syncer))
m[PeerMgr] = log.NewWithModule(PeerMgr)
m[PeerMgr].Logger.SetLevel(log.ParseLevel(config.Log.Module.PeerMgr))
m[Manger] = log.NewWithModule(Manger)
m[Manger].Logger.SetLevel(log.ParseLevel(config.Log.Module.Manger))
m[Manager] = log.NewWithModule(Manager)
m[Manager].Logger.SetLevel(log.ParseLevel(config.Log.Module.Manger))
m[Rule] = log.NewWithModule(Rule)
m[Rule].Logger.SetLevel(log.ParseLevel(config.Log.Module.Rule))
w = &loggerWrapper{loggers: m}
......
package manger
package manager
import (
appchainmgr "github.com/meshplus/bitxhub-core/appchain-mgr"
......
package manger
package manager
import (
"github.com/meshplus/bitxhub-core/governance"
......
......@@ -66,7 +66,7 @@ type LogModule struct {
Router string `toml:"router" json:"router" json:"router,omitempty"`
Swarm string `toml:"swarm" json:"swarm" json:"swarm,omitempty"`
Syncer string `toml:"syncer" json:"syncer" json:"syncer,omitempty"`
Manger string `toml:"manger" json:"manger" json:"manger,omitempty"`
Manger string `toml:"manager" json:"manager" json:"manager,omitempty"`
Rule string `toml:"rule" json:"rule" json:"rule,omitempty"`
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment