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