Commit 5aaf11a4 authored by suyanlong's avatar suyanlong

rename Sidecar to App

parent 109ae137
Pipeline #7975 canceled with stages
...@@ -32,7 +32,7 @@ func main() { ...@@ -32,7 +32,7 @@ func main() {
app.Commands = []cli.Command{ app.Commands = []cli.Command{
//appchainBxhCMD, //appchainBxhCMD,
//client.LoadClientCMD(), //client.LoadClientCMD(),
//idCMD, idCMD,
initCMD, initCMD,
interchainCMD, interchainCMD,
p2pCMD, p2pCMD,
......
...@@ -76,7 +76,7 @@ func start(ctx *cli.Context) error { ...@@ -76,7 +76,7 @@ func start(ctx *cli.Context) error {
wg.Wait() wg.Wait()
logger.Info("Sidecar exits") logger.Info("App exits")
return nil return nil
} }
......
...@@ -22,8 +22,8 @@ import ( ...@@ -22,8 +22,8 @@ import (
"github.com/link33/sidecar/pkg/plugins" "github.com/link33/sidecar/pkg/plugins"
) )
// Sidecar represents the necessary data for starting the sidecar app // App represents the necessary data for starting the sidecar app
type Sidecar struct { type App struct {
privateKey crypto.PrivateKey privateKey crypto.PrivateKey
storage storage.Storage storage storage.Storage
ctx context.Context ctx context.Context
...@@ -62,7 +62,7 @@ func NewSidecar(repoRoot string, config *repo.Config) (internal.Launcher, error) ...@@ -62,7 +62,7 @@ func NewSidecar(repoRoot string, config *repo.Config) (internal.Launcher, error)
mg, err := manger.NewManager(addr.String(), r, pm, appchainMgr, loggers.Logger(loggers.Manger)) mg, err := manger.NewManager(addr.String(), r, pm, appchainMgr, loggers.Logger(loggers.Manger))
Asset(err) Asset(err)
ctx, cancel := context.WithCancel(context.Background()) ctx, cancel := context.WithCancel(context.Background())
return &Sidecar{ return &App{
storage: store, storage: store,
logger: logger, logger: logger,
ctx: ctx, ctx: ctx,
...@@ -73,12 +73,12 @@ func NewSidecar(repoRoot string, config *repo.Config) (internal.Launcher, error) ...@@ -73,12 +73,12 @@ func NewSidecar(repoRoot string, config *repo.Config) (internal.Launcher, error)
} }
// Start starts three main components of sidecar app // Start starts three main components of sidecar app
func (s *Sidecar) Start() error { func (s *App) Start() error {
return s.manger.Start() return s.manger.Start()
} }
// Stop stops three main components of sidecar app // Stop stops three main components of sidecar app
func (s *Sidecar) Stop() error { func (s *App) Stop() error {
return s.manger.Stop() return s.manger.Stop()
} }
......
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