Add tree params and debugging

This commit is contained in:
mcrakhman authored and Mikhail Iudin committed 2022-12-03 15:06:43 +01:00
1 parent e6f4ff2f20
commit 8735700514
8 files changed
+600 -29

No files matched your search

+9
View File
@@ -15,6 +15,7 @@ var log = logger.NewNamed(CName)
type Service interface {
app.Component
DumpTree(ctx context.Context, ip string, request *apiproto.DumpTreeRequest) (resp *apiproto.DumpTreeResponse, err error)
TreeParams(ctx context.Context, ip string, request *apiproto.TreeParamsRequest) (resp *apiproto.TreeParamsResponse, err error)
AllTrees(ctx context.Context, ip string, request *apiproto.AllTreesRequest) (resp *apiproto.AllTreesResponse, err error)
AllSpaces(ctx context.Context, ip string, request *apiproto.AllSpacesRequest) (resp *apiproto.AllSpacesResponse, err error)
}
@@ -44,6 +45,14 @@ func (s *service) DumpTree(ctx context.Context, ip string, request *apiproto.Dum
return cl.DumpTree(ctx, request)
}
func (s *service) TreeParams(ctx context.Context, ip string, request *apiproto.TreeParamsRequest) (resp *apiproto.TreeParamsResponse, err error) {
cl, err := s.client.GetNode(ctx, ip)
if err != nil {
return
}
return cl.TreeParams(ctx, request)
}
func (s *service) AllTrees(ctx context.Context, ip string, request *apiproto.AllTreesRequest) (resp *apiproto.AllTreesResponse, err error) {
cl, err := s.client.GetNode(ctx, ip)
if err != nil {