WIP debug client
This commit is contained in:
1 parent
8b630dc7be
commit
17d24547aa
7 files changed
+239
-25
No files matched your search
@@ -0,0 +1,32 @@
|
||||
package node
|
||||
|
||||
import (
|
||||
"github.com/anytypeio/go-anytype-infrastructure-experiments/common/app"
|
||||
"github.com/anytypeio/go-anytype-infrastructure-experiments/common/app/logger"
|
||||
"github.com/anytypeio/go-anytype-infrastructure-experiments/util/cmd/debug/drpcclient"
|
||||
)
|
||||
|
||||
const CName = "api.node"
|
||||
|
||||
var log = logger.NewNamed(CName)
|
||||
|
||||
type Service interface {
|
||||
app.Component
|
||||
}
|
||||
|
||||
type service struct {
|
||||
client drpcclient.Service
|
||||
}
|
||||
|
||||
func New() Service {
|
||||
return &service{}
|
||||
}
|
||||
|
||||
func (s *service) Init(a *app.App) (err error) {
|
||||
s.client = a.MustComponent(drpcclient.CName).(drpcclient.Service)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *service) Name() (name string) {
|
||||
return CName
|
||||
}
|
||||
Reference in new issue
Block a user