Add comments and change cnames
This commit is contained in:
parent
7046601ef8
commit
a32a3674b1
@ -100,7 +100,7 @@ func (s *service) loadSpace(ctx context.Context, id string) (value ocache.Object
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
ns.SyncStatus().(syncstatus.SyncStatusWatcher).SetUpdateReceiver(&statusReceiver{})
|
ns.SyncStatus().(syncstatus.StatusWatcher).SetUpdateReceiver(&statusReceiver{})
|
||||||
if err = ns.Init(ctx); err != nil {
|
if err = ns.Init(ctx); err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,7 +10,7 @@ type statusReceiver struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *statusReceiver) UpdateTree(ctx context.Context, treeId string, status syncstatus.SyncStatus) (err error) {
|
func (s *statusReceiver) UpdateTree(ctx context.Context, treeId string, status syncstatus.SyncStatus) (err error) {
|
||||||
log.With(zap.String("treeId", treeId), zap.Bool("synced", status == syncstatus.SyncStatusSynced)).
|
log.With(zap.String("treeId", treeId), zap.Bool("synced", status == syncstatus.StatusSynced)).
|
||||||
Debug("updating sync status")
|
Debug("updating sync status")
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17,7 +17,7 @@ import (
|
|||||||
"storj.io/drpc"
|
"storj.io/drpc"
|
||||||
)
|
)
|
||||||
|
|
||||||
const CName = "debug.clientdebugrpc"
|
const CName = "common.debug.clientdebugrpc"
|
||||||
|
|
||||||
var log = logger.NewNamed(CName)
|
var log = logger.NewNamed(CName)
|
||||||
|
|
||||||
|
|||||||
@ -31,7 +31,7 @@ func (r *rpcHandler) Watch(ctx context.Context, request *clientdebugrpcproto.Wat
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
watcher := space.SyncStatus().(syncstatus.SyncStatusWatcher)
|
watcher := space.SyncStatus().(syncstatus.StatusWatcher)
|
||||||
watcher.Watch(request.TreeId)
|
watcher.Watch(request.TreeId)
|
||||||
resp = &clientdebugrpcproto.WatchResponse{}
|
resp = &clientdebugrpcproto.WatchResponse{}
|
||||||
return
|
return
|
||||||
@ -42,7 +42,7 @@ func (r *rpcHandler) Unwatch(ctx context.Context, request *clientdebugrpcproto.U
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
watcher := space.SyncStatus().(syncstatus.SyncStatusWatcher)
|
watcher := space.SyncStatus().(syncstatus.StatusWatcher)
|
||||||
watcher.Unwatch(request.TreeId)
|
watcher.Unwatch(request.TreeId)
|
||||||
resp = &clientdebugrpcproto.UnwatchResponse{}
|
resp = &clientdebugrpcproto.UnwatchResponse{}
|
||||||
return
|
return
|
||||||
|
|||||||
@ -7,7 +7,7 @@ import (
|
|||||||
"github.com/anytypeio/go-anytype-infrastructure-experiments/common/config"
|
"github.com/anytypeio/go-anytype-infrastructure-experiments/common/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
const CName = "common.account"
|
const CName = "common.accountservice"
|
||||||
|
|
||||||
type Service interface {
|
type Service interface {
|
||||||
app.Component
|
app.Component
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import (
|
|||||||
"github.com/ipfs/go-cid"
|
"github.com/ipfs/go-cid"
|
||||||
)
|
)
|
||||||
|
|
||||||
var log = logger.NewNamed("filenode.fileblockstore")
|
var log = logger.NewNamed(CName)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
ErrCIDNotFound = fileprotoerr.ErrCIDNotFound
|
ErrCIDNotFound = fileprotoerr.ErrCIDNotFound
|
||||||
|
|||||||
@ -30,7 +30,7 @@ func newDiffSyncer(
|
|||||||
cache treegetter.TreeGetter,
|
cache treegetter.TreeGetter,
|
||||||
storage spacestorage.SpaceStorage,
|
storage spacestorage.SpaceStorage,
|
||||||
clientFactory spacesyncproto.ClientFactory,
|
clientFactory spacesyncproto.ClientFactory,
|
||||||
syncStatus syncstatus.SyncStatusUpdater,
|
syncStatus syncstatus.StatusUpdater,
|
||||||
log *zap.Logger) DiffSyncer {
|
log *zap.Logger) DiffSyncer {
|
||||||
return &diffSyncer{
|
return &diffSyncer{
|
||||||
diff: diff,
|
diff: diff,
|
||||||
@ -53,7 +53,7 @@ type diffSyncer struct {
|
|||||||
clientFactory spacesyncproto.ClientFactory
|
clientFactory spacesyncproto.ClientFactory
|
||||||
log *zap.Logger
|
log *zap.Logger
|
||||||
deletionState deletionstate.DeletionState
|
deletionState deletionstate.DeletionState
|
||||||
syncStatus syncstatus.SyncStatusUpdater
|
syncStatus syncstatus.StatusUpdater
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *diffSyncer) Init(deletionState deletionstate.DeletionState) {
|
func (d *diffSyncer) Init(deletionState deletionstate.DeletionState) {
|
||||||
|
|||||||
@ -49,7 +49,7 @@ func NewHeadSync(
|
|||||||
storage spacestorage.SpaceStorage,
|
storage spacestorage.SpaceStorage,
|
||||||
confConnector nodeconf.ConfConnector,
|
confConnector nodeconf.ConfConnector,
|
||||||
cache treegetter.TreeGetter,
|
cache treegetter.TreeGetter,
|
||||||
syncStatus syncstatus.SyncStatusUpdater,
|
syncStatus syncstatus.StatusUpdater,
|
||||||
log *zap.Logger) HeadSync {
|
log *zap.Logger) HeadSync {
|
||||||
|
|
||||||
diff := ldiff.New(16, 16)
|
diff := ldiff.New(16, 16)
|
||||||
|
|||||||
@ -41,7 +41,7 @@ type syncTree struct {
|
|||||||
objecttree.ObjectTree
|
objecttree.ObjectTree
|
||||||
synchandler.SyncHandler
|
synchandler.SyncHandler
|
||||||
syncClient SyncClient
|
syncClient SyncClient
|
||||||
syncStatus syncstatus.SyncStatusUpdater
|
syncStatus syncstatus.StatusUpdater
|
||||||
notifiable HeadNotifiable
|
notifiable HeadNotifiable
|
||||||
listener updatelistener.UpdateListener
|
listener updatelistener.UpdateListener
|
||||||
treeUsage *atomic.Int32
|
treeUsage *atomic.Int32
|
||||||
@ -63,7 +63,7 @@ type CreateDeps struct {
|
|||||||
ObjectSync objectsync.ObjectSync
|
ObjectSync objectsync.ObjectSync
|
||||||
AclList list.ACLList
|
AclList list.ACLList
|
||||||
SpaceStorage spacestorage.SpaceStorage
|
SpaceStorage spacestorage.SpaceStorage
|
||||||
SyncStatus syncstatus.SyncStatusUpdater
|
SyncStatus syncstatus.StatusUpdater
|
||||||
HeadNotifiable HeadNotifiable
|
HeadNotifiable HeadNotifiable
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,7 +77,7 @@ type BuildDeps struct {
|
|||||||
SpaceStorage spacestorage.SpaceStorage
|
SpaceStorage spacestorage.SpaceStorage
|
||||||
TreeStorage treestorage.TreeStorage
|
TreeStorage treestorage.TreeStorage
|
||||||
TreeUsage *atomic.Int32
|
TreeUsage *atomic.Int32
|
||||||
SyncStatus syncstatus.SyncStatusUpdater
|
SyncStatus syncstatus.StatusUpdater
|
||||||
}
|
}
|
||||||
|
|
||||||
func newWrappedSyncClient(
|
func newWrappedSyncClient(
|
||||||
|
|||||||
@ -16,14 +16,14 @@ import (
|
|||||||
type syncTreeHandler struct {
|
type syncTreeHandler struct {
|
||||||
objTree objecttree.ObjectTree
|
objTree objecttree.ObjectTree
|
||||||
syncClient SyncClient
|
syncClient SyncClient
|
||||||
syncStatus syncstatus.SyncStatusUpdater
|
syncStatus syncstatus.StatusUpdater
|
||||||
handlerLock sync.Mutex
|
handlerLock sync.Mutex
|
||||||
queue ReceiveQueue
|
queue ReceiveQueue
|
||||||
}
|
}
|
||||||
|
|
||||||
const maxQueueSize = 5
|
const maxQueueSize = 5
|
||||||
|
|
||||||
func newSyncTreeHandler(objTree objecttree.ObjectTree, syncClient SyncClient, syncStatus syncstatus.SyncStatusUpdater) synchandler.SyncHandler {
|
func newSyncTreeHandler(objTree objecttree.ObjectTree, syncClient SyncClient, syncStatus syncstatus.StatusUpdater) synchandler.SyncHandler {
|
||||||
return &syncTreeHandler{
|
return &syncTreeHandler{
|
||||||
objTree: objTree,
|
objTree: objTree,
|
||||||
syncClient: syncClient,
|
syncClient: syncClient,
|
||||||
|
|||||||
@ -7,7 +7,7 @@ import (
|
|||||||
"github.com/anytypeio/go-anytype-infrastructure-experiments/common/commonspace/object/tree/objecttree"
|
"github.com/anytypeio/go-anytype-infrastructure-experiments/common/commonspace/object/tree/objecttree"
|
||||||
)
|
)
|
||||||
|
|
||||||
const CName = "object.treegetter"
|
const CName = "common.object.treegetter"
|
||||||
|
|
||||||
type TreeGetter interface {
|
type TreeGetter interface {
|
||||||
app.ComponentRunnable
|
app.ComponentRunnable
|
||||||
|
|||||||
@ -15,7 +15,7 @@ import (
|
|||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|
||||||
var log = logger.NewNamed("commonspace.settings")
|
var log = logger.NewNamed("common.commonspace.settings")
|
||||||
|
|
||||||
type SettingsObject interface {
|
type SettingsObject interface {
|
||||||
synctree.SyncTree
|
synctree.SyncTree
|
||||||
|
|||||||
@ -81,7 +81,7 @@ type Space interface {
|
|||||||
BuildTree(ctx context.Context, id string, listener updatelistener.UpdateListener) (objecttree.ObjectTree, error)
|
BuildTree(ctx context.Context, id string, listener updatelistener.UpdateListener) (objecttree.ObjectTree, error)
|
||||||
DeleteTree(ctx context.Context, id string) (err error)
|
DeleteTree(ctx context.Context, id string) (err error)
|
||||||
|
|
||||||
SyncStatus() syncstatus.SyncStatusUpdater
|
SyncStatus() syncstatus.StatusUpdater
|
||||||
|
|
||||||
Close() error
|
Close() error
|
||||||
}
|
}
|
||||||
@ -95,7 +95,7 @@ type space struct {
|
|||||||
|
|
||||||
objectSync objectsync.ObjectSync
|
objectSync objectsync.ObjectSync
|
||||||
headSync headsync.HeadSync
|
headSync headsync.HeadSync
|
||||||
syncStatus syncstatus.SyncStatusUpdater
|
syncStatus syncstatus.StatusUpdater
|
||||||
storage spacestorage.SpaceStorage
|
storage spacestorage.SpaceStorage
|
||||||
cache treegetter.TreeGetter
|
cache treegetter.TreeGetter
|
||||||
account accountservice.Service
|
account accountservice.Service
|
||||||
@ -207,7 +207,7 @@ func (s *space) HeadSync() headsync.HeadSync {
|
|||||||
return s.headSync
|
return s.headSync
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *space) SyncStatus() syncstatus.SyncStatusUpdater {
|
func (s *space) SyncStatus() syncstatus.StatusUpdater {
|
||||||
return s.syncStatus
|
return s.syncStatus
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -113,7 +113,7 @@ func (s *spaceService) NewSpace(ctx context.Context, id string) (Space, error) {
|
|||||||
syncStatus := syncstatus.NewNoOpSyncStatus()
|
syncStatus := syncstatus.NewNoOpSyncStatus()
|
||||||
// this will work only for clients, not the best solution, but...
|
// this will work only for clients, not the best solution, but...
|
||||||
if !lastConfiguration.IsResponsible(st.Id()) {
|
if !lastConfiguration.IsResponsible(st.Id()) {
|
||||||
// TODO: move it to the client package and add possibility to inject SyncStatusProvider from the client
|
// TODO: move it to the client package and add possibility to inject StatusProvider from the client
|
||||||
syncStatus = syncstatus.NewSyncStatusProvider(st.Id(), syncstatus.DefaultDeps(lastConfiguration, st))
|
syncStatus = syncstatus.NewSyncStatusProvider(st.Id(), syncstatus.DefaultDeps(lastConfiguration, st))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,266 +0,0 @@
|
|||||||
// Code generated by MockGen. DO NOT EDIT.
|
|
||||||
// Source: github.com/anytypeio/go-anytype-infrastructure-experiments/common/commonspace/spacestorage (interfaces: SpaceStorageProvider,SpaceStorage)
|
|
||||||
|
|
||||||
// Package mock_spacestorage is a generated GoMock package.
|
|
||||||
package mock_spacestorage
|
|
||||||
|
|
||||||
import (
|
|
||||||
reflect "reflect"
|
|
||||||
|
|
||||||
app "github.com/anytypeio/go-anytype-infrastructure-experiments/common/app"
|
|
||||||
liststorage "github.com/anytypeio/go-anytype-infrastructure-experiments/common/commonspace/object/acl/liststorage"
|
|
||||||
treestorage "github.com/anytypeio/go-anytype-infrastructure-experiments/common/commonspace/object/tree/treestorage"
|
|
||||||
spacestorage "github.com/anytypeio/go-anytype-infrastructure-experiments/common/commonspace/spacestorage"
|
|
||||||
spacesyncproto "github.com/anytypeio/go-anytype-infrastructure-experiments/common/commonspace/spacesyncproto"
|
|
||||||
gomock "github.com/golang/mock/gomock"
|
|
||||||
)
|
|
||||||
|
|
||||||
// MockSpaceStorageProvider is a mock of SpaceStorageProvider interface.
|
|
||||||
type MockSpaceStorageProvider struct {
|
|
||||||
ctrl *gomock.Controller
|
|
||||||
recorder *MockSpaceStorageProviderMockRecorder
|
|
||||||
}
|
|
||||||
|
|
||||||
// MockSpaceStorageProviderMockRecorder is the mock recorder for MockSpaceStorageProvider.
|
|
||||||
type MockSpaceStorageProviderMockRecorder struct {
|
|
||||||
mock *MockSpaceStorageProvider
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewMockSpaceStorageProvider creates a new mock instance.
|
|
||||||
func NewMockSpaceStorageProvider(ctrl *gomock.Controller) *MockSpaceStorageProvider {
|
|
||||||
mock := &MockSpaceStorageProvider{ctrl: ctrl}
|
|
||||||
mock.recorder = &MockSpaceStorageProviderMockRecorder{mock}
|
|
||||||
return mock
|
|
||||||
}
|
|
||||||
|
|
||||||
// EXPECT returns an object that allows the caller to indicate expected use.
|
|
||||||
func (m *MockSpaceStorageProvider) EXPECT() *MockSpaceStorageProviderMockRecorder {
|
|
||||||
return m.recorder
|
|
||||||
}
|
|
||||||
|
|
||||||
// CreateSpaceStorage mocks base method.
|
|
||||||
func (m *MockSpaceStorageProvider) CreateSpaceStorage(arg0 spacestorage.SpaceStorageCreatePayload) (spacestorage.SpaceStorage, error) {
|
|
||||||
m.ctrl.T.Helper()
|
|
||||||
ret := m.ctrl.Call(m, "CreateSpaceStorage", arg0)
|
|
||||||
ret0, _ := ret[0].(spacestorage.SpaceStorage)
|
|
||||||
ret1, _ := ret[1].(error)
|
|
||||||
return ret0, ret1
|
|
||||||
}
|
|
||||||
|
|
||||||
// CreateSpaceStorage indicates an expected call of CreateSpaceStorage.
|
|
||||||
func (mr *MockSpaceStorageProviderMockRecorder) CreateSpaceStorage(arg0 interface{}) *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateSpaceStorage", reflect.TypeOf((*MockSpaceStorageProvider)(nil).CreateSpaceStorage), arg0)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Init mocks base method.
|
|
||||||
func (m *MockSpaceStorageProvider) Init(arg0 *app.App) error {
|
|
||||||
m.ctrl.T.Helper()
|
|
||||||
ret := m.ctrl.Call(m, "Init", arg0)
|
|
||||||
ret0, _ := ret[0].(error)
|
|
||||||
return ret0
|
|
||||||
}
|
|
||||||
|
|
||||||
// Init indicates an expected call of Init.
|
|
||||||
func (mr *MockSpaceStorageProviderMockRecorder) Init(arg0 interface{}) *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockSpaceStorageProvider)(nil).Init), arg0)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Name mocks base method.
|
|
||||||
func (m *MockSpaceStorageProvider) Name() string {
|
|
||||||
m.ctrl.T.Helper()
|
|
||||||
ret := m.ctrl.Call(m, "Name")
|
|
||||||
ret0, _ := ret[0].(string)
|
|
||||||
return ret0
|
|
||||||
}
|
|
||||||
|
|
||||||
// Name indicates an expected call of Name.
|
|
||||||
func (mr *MockSpaceStorageProviderMockRecorder) Name() *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockSpaceStorageProvider)(nil).Name))
|
|
||||||
}
|
|
||||||
|
|
||||||
// SpaceStorage mocks base method.
|
|
||||||
func (m *MockSpaceStorageProvider) SpaceStorage(arg0 string) (spacestorage.SpaceStorage, error) {
|
|
||||||
m.ctrl.T.Helper()
|
|
||||||
ret := m.ctrl.Call(m, "SpaceStorage", arg0)
|
|
||||||
ret0, _ := ret[0].(spacestorage.SpaceStorage)
|
|
||||||
ret1, _ := ret[1].(error)
|
|
||||||
return ret0, ret1
|
|
||||||
}
|
|
||||||
|
|
||||||
// SpaceStorage indicates an expected call of SpaceStorage.
|
|
||||||
func (mr *MockSpaceStorageProviderMockRecorder) SpaceStorage(arg0 interface{}) *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpaceStorage", reflect.TypeOf((*MockSpaceStorageProvider)(nil).SpaceStorage), arg0)
|
|
||||||
}
|
|
||||||
|
|
||||||
// MockSpaceStorage is a mock of SpaceStorage interface.
|
|
||||||
type MockSpaceStorage struct {
|
|
||||||
ctrl *gomock.Controller
|
|
||||||
recorder *MockSpaceStorageMockRecorder
|
|
||||||
}
|
|
||||||
|
|
||||||
// MockSpaceStorageMockRecorder is the mock recorder for MockSpaceStorage.
|
|
||||||
type MockSpaceStorageMockRecorder struct {
|
|
||||||
mock *MockSpaceStorage
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewMockSpaceStorage creates a new mock instance.
|
|
||||||
func NewMockSpaceStorage(ctrl *gomock.Controller) *MockSpaceStorage {
|
|
||||||
mock := &MockSpaceStorage{ctrl: ctrl}
|
|
||||||
mock.recorder = &MockSpaceStorageMockRecorder{mock}
|
|
||||||
return mock
|
|
||||||
}
|
|
||||||
|
|
||||||
// EXPECT returns an object that allows the caller to indicate expected use.
|
|
||||||
func (m *MockSpaceStorage) EXPECT() *MockSpaceStorageMockRecorder {
|
|
||||||
return m.recorder
|
|
||||||
}
|
|
||||||
|
|
||||||
// ACLStorage mocks base method.
|
|
||||||
func (m *MockSpaceStorage) ACLStorage() (liststorage.ListStorage, error) {
|
|
||||||
m.ctrl.T.Helper()
|
|
||||||
ret := m.ctrl.Call(m, "ACLStorage")
|
|
||||||
ret0, _ := ret[0].(liststorage.ListStorage)
|
|
||||||
ret1, _ := ret[1].(error)
|
|
||||||
return ret0, ret1
|
|
||||||
}
|
|
||||||
|
|
||||||
// ACLStorage indicates an expected call of ACLStorage.
|
|
||||||
func (mr *MockSpaceStorageMockRecorder) ACLStorage() *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ACLStorage", reflect.TypeOf((*MockSpaceStorage)(nil).ACLStorage))
|
|
||||||
}
|
|
||||||
|
|
||||||
// Close mocks base method.
|
|
||||||
func (m *MockSpaceStorage) Close() error {
|
|
||||||
m.ctrl.T.Helper()
|
|
||||||
ret := m.ctrl.Call(m, "Close")
|
|
||||||
ret0, _ := ret[0].(error)
|
|
||||||
return ret0
|
|
||||||
}
|
|
||||||
|
|
||||||
// Close indicates an expected call of Close.
|
|
||||||
func (mr *MockSpaceStorageMockRecorder) Close() *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockSpaceStorage)(nil).Close))
|
|
||||||
}
|
|
||||||
|
|
||||||
// CreateTreeStorage mocks base method.
|
|
||||||
func (m *MockSpaceStorage) CreateTreeStorage(arg0 treestorage.TreeStorageCreatePayload) (treestorage.TreeStorage, error) {
|
|
||||||
m.ctrl.T.Helper()
|
|
||||||
ret := m.ctrl.Call(m, "CreateTreeStorage", arg0)
|
|
||||||
ret0, _ := ret[0].(treestorage.TreeStorage)
|
|
||||||
ret1, _ := ret[1].(error)
|
|
||||||
return ret0, ret1
|
|
||||||
}
|
|
||||||
|
|
||||||
// CreateTreeStorage indicates an expected call of CreateTreeStorage.
|
|
||||||
func (mr *MockSpaceStorageMockRecorder) CreateTreeStorage(arg0 interface{}) *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateTreeStorage", reflect.TypeOf((*MockSpaceStorage)(nil).CreateTreeStorage), arg0)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Id mocks base method.
|
|
||||||
func (m *MockSpaceStorage) Id() string {
|
|
||||||
m.ctrl.T.Helper()
|
|
||||||
ret := m.ctrl.Call(m, "Id")
|
|
||||||
ret0, _ := ret[0].(string)
|
|
||||||
return ret0
|
|
||||||
}
|
|
||||||
|
|
||||||
// Id indicates an expected call of Id.
|
|
||||||
func (mr *MockSpaceStorageMockRecorder) Id() *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Id", reflect.TypeOf((*MockSpaceStorage)(nil).Id))
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetTreeDeletedStatus mocks base method.
|
|
||||||
func (m *MockSpaceStorage) SetTreeDeletedStatus(arg0, arg1 string) error {
|
|
||||||
m.ctrl.T.Helper()
|
|
||||||
ret := m.ctrl.Call(m, "SetTreeDeletedStatus", arg0, arg1)
|
|
||||||
ret0, _ := ret[0].(error)
|
|
||||||
return ret0
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetTreeDeletedStatus indicates an expected call of SetTreeDeletedStatus.
|
|
||||||
func (mr *MockSpaceStorageMockRecorder) SetTreeDeletedStatus(arg0, arg1 interface{}) *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetTreeDeletedStatus", reflect.TypeOf((*MockSpaceStorage)(nil).SetTreeDeletedStatus), arg0, arg1)
|
|
||||||
}
|
|
||||||
|
|
||||||
// SpaceHeader mocks base method.
|
|
||||||
func (m *MockSpaceStorage) SpaceHeader() (*spacesyncproto.RawSpaceHeaderWithId, error) {
|
|
||||||
m.ctrl.T.Helper()
|
|
||||||
ret := m.ctrl.Call(m, "SpaceHeader")
|
|
||||||
ret0, _ := ret[0].(*spacesyncproto.RawSpaceHeaderWithId)
|
|
||||||
ret1, _ := ret[1].(error)
|
|
||||||
return ret0, ret1
|
|
||||||
}
|
|
||||||
|
|
||||||
// SpaceHeader indicates an expected call of SpaceHeader.
|
|
||||||
func (mr *MockSpaceStorageMockRecorder) SpaceHeader() *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpaceHeader", reflect.TypeOf((*MockSpaceStorage)(nil).SpaceHeader))
|
|
||||||
}
|
|
||||||
|
|
||||||
// SpaceSettingsId mocks base method.
|
|
||||||
func (m *MockSpaceStorage) SpaceSettingsId() string {
|
|
||||||
m.ctrl.T.Helper()
|
|
||||||
ret := m.ctrl.Call(m, "SpaceSettingsId")
|
|
||||||
ret0, _ := ret[0].(string)
|
|
||||||
return ret0
|
|
||||||
}
|
|
||||||
|
|
||||||
// SpaceSettingsId indicates an expected call of SpaceSettingsId.
|
|
||||||
func (mr *MockSpaceStorageMockRecorder) SpaceSettingsId() *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpaceSettingsId", reflect.TypeOf((*MockSpaceStorage)(nil).SpaceSettingsId))
|
|
||||||
}
|
|
||||||
|
|
||||||
// StoredIds mocks base method.
|
|
||||||
func (m *MockSpaceStorage) StoredIds() ([]string, error) {
|
|
||||||
m.ctrl.T.Helper()
|
|
||||||
ret := m.ctrl.Call(m, "StoredIds")
|
|
||||||
ret0, _ := ret[0].([]string)
|
|
||||||
ret1, _ := ret[1].(error)
|
|
||||||
return ret0, ret1
|
|
||||||
}
|
|
||||||
|
|
||||||
// StoredIds indicates an expected call of StoredIds.
|
|
||||||
func (mr *MockSpaceStorageMockRecorder) StoredIds() *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StoredIds", reflect.TypeOf((*MockSpaceStorage)(nil).StoredIds))
|
|
||||||
}
|
|
||||||
|
|
||||||
// TreeDeletedStatus mocks base method.
|
|
||||||
func (m *MockSpaceStorage) TreeDeletedStatus(arg0 string) (string, error) {
|
|
||||||
m.ctrl.T.Helper()
|
|
||||||
ret := m.ctrl.Call(m, "TreeDeletedStatus", arg0)
|
|
||||||
ret0, _ := ret[0].(string)
|
|
||||||
ret1, _ := ret[1].(error)
|
|
||||||
return ret0, ret1
|
|
||||||
}
|
|
||||||
|
|
||||||
// TreeDeletedStatus indicates an expected call of TreeDeletedStatus.
|
|
||||||
func (mr *MockSpaceStorageMockRecorder) TreeDeletedStatus(arg0 interface{}) *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TreeDeletedStatus", reflect.TypeOf((*MockSpaceStorage)(nil).TreeDeletedStatus), arg0)
|
|
||||||
}
|
|
||||||
|
|
||||||
// TreeStorage mocks base method.
|
|
||||||
func (m *MockSpaceStorage) TreeStorage(arg0 string) (treestorage.TreeStorage, error) {
|
|
||||||
m.ctrl.T.Helper()
|
|
||||||
ret := m.ctrl.Call(m, "TreeStorage", arg0)
|
|
||||||
ret0, _ := ret[0].(treestorage.TreeStorage)
|
|
||||||
ret1, _ := ret[1].(error)
|
|
||||||
return ret0, ret1
|
|
||||||
}
|
|
||||||
|
|
||||||
// TreeStorage indicates an expected call of TreeStorage.
|
|
||||||
func (mr *MockSpaceStorageMockRecorder) TreeStorage(arg0 interface{}) *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TreeStorage", reflect.TypeOf((*MockSpaceStorage)(nil).TreeStorage), arg0)
|
|
||||||
}
|
|
||||||
@ -11,7 +11,7 @@ import (
|
|||||||
"github.com/anytypeio/go-anytype-infrastructure-experiments/common/commonspace/spacesyncproto"
|
"github.com/anytypeio/go-anytype-infrastructure-experiments/common/commonspace/spacesyncproto"
|
||||||
)
|
)
|
||||||
|
|
||||||
const CName = "commonspace.spacestorage"
|
const CName = "common.commonspace.spacestorage"
|
||||||
|
|
||||||
var (
|
var (
|
||||||
ErrSpaceStorageExists = errors.New("space storage exists")
|
ErrSpaceStorageExists = errors.New("space storage exists")
|
||||||
@ -25,6 +25,7 @@ const (
|
|||||||
TreeDeletedStatusDeleted = "deleted"
|
TreeDeletedStatusDeleted = "deleted"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// TODO: consider moving to some file with all common interfaces etc
|
||||||
type SpaceStorage interface {
|
type SpaceStorage interface {
|
||||||
treestorage.Provider
|
treestorage.Provider
|
||||||
Id() string
|
Id() string
|
||||||
|
|||||||
@ -13,11 +13,11 @@ enum ErrCodes {
|
|||||||
service SpaceSync {
|
service SpaceSync {
|
||||||
// HeadSync compares all objects and their hashes in a space
|
// HeadSync compares all objects and their hashes in a space
|
||||||
rpc HeadSync(HeadSyncRequest) returns (HeadSyncResponse);
|
rpc HeadSync(HeadSyncRequest) returns (HeadSyncResponse);
|
||||||
// PushSpace sends new space to the node
|
// SpacePush sends new space to the node
|
||||||
rpc SpacePush(SpacePushRequest) returns (SpacePushResponse);
|
rpc SpacePush(SpacePushRequest) returns (SpacePushResponse);
|
||||||
// PullSpace gets space from the remote peer
|
// SpacePull gets space from the remote peer
|
||||||
rpc SpacePull(SpacePullRequest) returns (SpacePullResponse);
|
rpc SpacePull(SpacePullRequest) returns (SpacePullResponse);
|
||||||
// Stream opens object sync stream with node or client
|
// ObjectSyncStream opens object sync stream with node or client
|
||||||
rpc ObjectSyncStream(stream ObjectSyncMessage) returns (stream ObjectSyncMessage);
|
rpc ObjectSyncStream(stream ObjectSyncMessage) returns (stream ObjectSyncMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -62,24 +62,25 @@ message ObjectSyncMessage {
|
|||||||
// string peerSignature = 6;
|
// string peerSignature = 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
// PushSpaceRequest is a request to add space on a node containing only one acl record
|
// SpacePushRequest is a request to add space on a node containing only one acl record
|
||||||
message SpacePushRequest {
|
message SpacePushRequest {
|
||||||
SpacePayload payload = 1;
|
SpacePayload payload = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// PushSpaceResponse is an empty response
|
// SpacePushResponse is an empty response
|
||||||
message SpacePushResponse {}
|
message SpacePushResponse {}
|
||||||
|
|
||||||
// PullSpaceRequest is a request to request a space on a node that doesn't have it
|
// SpacePullRequest is a request to request a space on a node that doesn't have it
|
||||||
message SpacePullRequest {
|
message SpacePullRequest {
|
||||||
string id = 1;
|
string id = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// PullSpaceResponse is a response with header and acl root
|
// SpacePullResponse is a response with header and acl root
|
||||||
message SpacePullResponse {
|
message SpacePullResponse {
|
||||||
SpacePayload payload = 1;
|
SpacePayload payload = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SpacePayload is a payload for pushing a space
|
||||||
message SpacePayload {
|
message SpacePayload {
|
||||||
RawSpaceHeaderWithId spaceHeader = 1;
|
RawSpaceHeaderWithId spaceHeader = 1;
|
||||||
bytes aclPayload = 2;
|
bytes aclPayload = 2;
|
||||||
@ -97,30 +98,36 @@ message SpaceHeader {
|
|||||||
bytes seed = 5;
|
bytes seed = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// RawSpaceHeader is raw header for SpaceHeader
|
||||||
message RawSpaceHeader {
|
message RawSpaceHeader {
|
||||||
bytes spaceHeader = 1;
|
bytes spaceHeader = 1;
|
||||||
bytes signature = 2;
|
bytes signature = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// RawSpaceHeaderWithId is a marshalled RawSpaceHeader with its content id
|
||||||
message RawSpaceHeaderWithId {
|
message RawSpaceHeaderWithId {
|
||||||
bytes rawHeader = 1;
|
bytes rawHeader = 1;
|
||||||
string id = 2;
|
string id = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SpaceSettingsContent is a payload for a space settings object
|
||||||
message SpaceSettingsContent {
|
message SpaceSettingsContent {
|
||||||
oneof value {
|
oneof value {
|
||||||
ObjectDelete objectDelete = 1;
|
ObjectDelete objectDelete = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ObjectDelete is a message containing an object id which should be deleted
|
||||||
message ObjectDelete {
|
message ObjectDelete {
|
||||||
string id = 1;
|
string id = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SpaceSettingsSnapshot contains all the deleted ids in a snapshot
|
||||||
message SpaceSettingsSnapshot {
|
message SpaceSettingsSnapshot {
|
||||||
repeated string deletedIds = 1;
|
repeated string deletedIds = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SettingsData contains ObjectTree change payload
|
||||||
message SettingsData {
|
message SettingsData {
|
||||||
repeated SpaceSettingsContent content = 1;
|
repeated SpaceSettingsContent content = 1;
|
||||||
SpaceSettingsSnapshot snapshot = 2;
|
SpaceSettingsSnapshot snapshot = 2;
|
||||||
|
|||||||
@ -395,7 +395,7 @@ func (m *ObjectSyncMessage) GetObjectId() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
// PushSpaceRequest is a request to add space on a node containing only one acl record
|
// SpacePushRequest is a request to add space on a node containing only one acl record
|
||||||
type SpacePushRequest struct {
|
type SpacePushRequest struct {
|
||||||
Payload *SpacePayload `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
|
Payload *SpacePayload `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
|
||||||
}
|
}
|
||||||
@ -440,7 +440,7 @@ func (m *SpacePushRequest) GetPayload() *SpacePayload {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// PushSpaceResponse is an empty response
|
// SpacePushResponse is an empty response
|
||||||
type SpacePushResponse struct {
|
type SpacePushResponse struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -477,7 +477,7 @@ func (m *SpacePushResponse) XXX_DiscardUnknown() {
|
|||||||
|
|
||||||
var xxx_messageInfo_SpacePushResponse proto.InternalMessageInfo
|
var xxx_messageInfo_SpacePushResponse proto.InternalMessageInfo
|
||||||
|
|
||||||
// PullSpaceRequest is a request to request a space on a node that doesn't have it
|
// SpacePullRequest is a request to request a space on a node that doesn't have it
|
||||||
type SpacePullRequest struct {
|
type SpacePullRequest struct {
|
||||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||||
}
|
}
|
||||||
@ -522,7 +522,7 @@ func (m *SpacePullRequest) GetId() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
// PullSpaceResponse is a response with header and acl root
|
// SpacePullResponse is a response with header and acl root
|
||||||
type SpacePullResponse struct {
|
type SpacePullResponse struct {
|
||||||
Payload *SpacePayload `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
|
Payload *SpacePayload `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
|
||||||
}
|
}
|
||||||
@ -567,6 +567,7 @@ func (m *SpacePullResponse) GetPayload() *SpacePayload {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SpacePayload is a payload for pushing a space
|
||||||
type SpacePayload struct {
|
type SpacePayload struct {
|
||||||
SpaceHeader *RawSpaceHeaderWithId `protobuf:"bytes,1,opt,name=spaceHeader,proto3" json:"spaceHeader,omitempty"`
|
SpaceHeader *RawSpaceHeaderWithId `protobuf:"bytes,1,opt,name=spaceHeader,proto3" json:"spaceHeader,omitempty"`
|
||||||
AclPayload []byte `protobuf:"bytes,2,opt,name=aclPayload,proto3" json:"aclPayload,omitempty"`
|
AclPayload []byte `protobuf:"bytes,2,opt,name=aclPayload,proto3" json:"aclPayload,omitempty"`
|
||||||
@ -720,6 +721,7 @@ func (m *SpaceHeader) GetSeed() []byte {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// RawSpaceHeader is raw header for SpaceHeader
|
||||||
type RawSpaceHeader struct {
|
type RawSpaceHeader struct {
|
||||||
SpaceHeader []byte `protobuf:"bytes,1,opt,name=spaceHeader,proto3" json:"spaceHeader,omitempty"`
|
SpaceHeader []byte `protobuf:"bytes,1,opt,name=spaceHeader,proto3" json:"spaceHeader,omitempty"`
|
||||||
Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
|
Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
|
||||||
@ -772,6 +774,7 @@ func (m *RawSpaceHeader) GetSignature() []byte {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// RawSpaceHeaderWithId is a marshalled RawSpaceHeader with its content id
|
||||||
type RawSpaceHeaderWithId struct {
|
type RawSpaceHeaderWithId struct {
|
||||||
RawHeader []byte `protobuf:"bytes,1,opt,name=rawHeader,proto3" json:"rawHeader,omitempty"`
|
RawHeader []byte `protobuf:"bytes,1,opt,name=rawHeader,proto3" json:"rawHeader,omitempty"`
|
||||||
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
|
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
|
||||||
@ -824,6 +827,7 @@ func (m *RawSpaceHeaderWithId) GetId() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SpaceSettingsContent is a payload for a space settings object
|
||||||
type SpaceSettingsContent struct {
|
type SpaceSettingsContent struct {
|
||||||
// Types that are valid to be assigned to Value:
|
// Types that are valid to be assigned to Value:
|
||||||
//
|
//
|
||||||
@ -897,6 +901,7 @@ func (*SpaceSettingsContent) XXX_OneofWrappers() []interface{} {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ObjectDelete is a message containing an object id which should be deleted
|
||||||
type ObjectDelete struct {
|
type ObjectDelete struct {
|
||||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||||
}
|
}
|
||||||
@ -941,6 +946,7 @@ func (m *ObjectDelete) GetId() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SpaceSettingsSnapshot contains all the deleted ids in a snapshot
|
||||||
type SpaceSettingsSnapshot struct {
|
type SpaceSettingsSnapshot struct {
|
||||||
DeletedIds []string `protobuf:"bytes,1,rep,name=deletedIds,proto3" json:"deletedIds,omitempty"`
|
DeletedIds []string `protobuf:"bytes,1,rep,name=deletedIds,proto3" json:"deletedIds,omitempty"`
|
||||||
}
|
}
|
||||||
@ -985,6 +991,7 @@ func (m *SpaceSettingsSnapshot) GetDeletedIds() []string {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SettingsData contains ObjectTree change payload
|
||||||
type SettingsData struct {
|
type SettingsData struct {
|
||||||
Content []*SpaceSettingsContent `protobuf:"bytes,1,rep,name=content,proto3" json:"content,omitempty"`
|
Content []*SpaceSettingsContent `protobuf:"bytes,1,rep,name=content,proto3" json:"content,omitempty"`
|
||||||
Snapshot *SpaceSettingsSnapshot `protobuf:"bytes,2,opt,name=snapshot,proto3" json:"snapshot,omitempty"`
|
Snapshot *SpaceSettingsSnapshot `protobuf:"bytes,2,opt,name=snapshot,proto3" json:"snapshot,omitempty"`
|
||||||
|
|||||||
@ -2,7 +2,7 @@ package syncstatus
|
|||||||
|
|
||||||
type noOpSyncStatus struct{}
|
type noOpSyncStatus struct{}
|
||||||
|
|
||||||
func NewNoOpSyncStatus() SyncStatusUpdater {
|
func NewNoOpSyncStatus() StatusUpdater {
|
||||||
return &noOpSyncStatus{}
|
return &noOpSyncStatus{}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -26,7 +26,7 @@ type UpdateReceiver interface {
|
|||||||
UpdateNodeConnection(online bool)
|
UpdateNodeConnection(online bool)
|
||||||
}
|
}
|
||||||
|
|
||||||
type SyncStatusUpdater interface {
|
type StatusUpdater interface {
|
||||||
HeadsChange(treeId string, heads []string)
|
HeadsChange(treeId string, heads []string)
|
||||||
HeadsReceive(senderId, treeId string, heads []string)
|
HeadsReceive(senderId, treeId string, heads []string)
|
||||||
|
|
||||||
@ -38,23 +38,23 @@ type SyncStatusUpdater interface {
|
|||||||
Close() error
|
Close() error
|
||||||
}
|
}
|
||||||
|
|
||||||
type SyncStatusWatcher interface {
|
type StatusWatcher interface {
|
||||||
Watch(treeId string) (err error)
|
Watch(treeId string) (err error)
|
||||||
Unwatch(treeId string)
|
Unwatch(treeId string)
|
||||||
SetUpdateReceiver(updater UpdateReceiver)
|
SetUpdateReceiver(updater UpdateReceiver)
|
||||||
}
|
}
|
||||||
|
|
||||||
type SyncStatusProvider interface {
|
type StatusProvider interface {
|
||||||
SyncStatusUpdater
|
StatusUpdater
|
||||||
SyncStatusWatcher
|
StatusWatcher
|
||||||
}
|
}
|
||||||
|
|
||||||
type SyncStatus int
|
type SyncStatus int
|
||||||
|
|
||||||
const (
|
const (
|
||||||
SyncStatusUnknown SyncStatus = iota
|
StatusUnknown SyncStatus = iota
|
||||||
SyncStatusSynced
|
StatusSynced
|
||||||
SyncStatusNotSynced
|
StatusNotSynced
|
||||||
)
|
)
|
||||||
|
|
||||||
type treeHeadsEntry struct {
|
type treeHeadsEntry struct {
|
||||||
@ -104,7 +104,7 @@ func DefaultDeps(configuration nodeconf.Configuration, store spacestorage.SpaceS
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewSyncStatusProvider(spaceId string, deps SyncStatusDeps) SyncStatusProvider {
|
func NewSyncStatusProvider(spaceId string, deps SyncStatusDeps) StatusProvider {
|
||||||
return &syncStatusProvider{
|
return &syncStatusProvider{
|
||||||
spaceId: spaceId,
|
spaceId: spaceId,
|
||||||
treeHeads: map[string]treeHeadsEntry{},
|
treeHeads: map[string]treeHeadsEntry{},
|
||||||
@ -143,7 +143,7 @@ func (s *syncStatusProvider) HeadsChange(treeId string, heads []string) {
|
|||||||
s.treeHeads[treeId] = treeHeadsEntry{
|
s.treeHeads[treeId] = treeHeadsEntry{
|
||||||
heads: headsCopy,
|
heads: headsCopy,
|
||||||
stateCounter: s.stateCounter,
|
stateCounter: s.stateCounter,
|
||||||
syncStatus: SyncStatusNotSynced,
|
syncStatus: StatusNotSynced,
|
||||||
}
|
}
|
||||||
s.stateCounter++
|
s.stateCounter++
|
||||||
}
|
}
|
||||||
@ -193,7 +193,7 @@ func (s *syncStatusProvider) HeadsReceive(senderId, treeId string, heads []strin
|
|||||||
defer s.Unlock()
|
defer s.Unlock()
|
||||||
|
|
||||||
curTreeHeads, ok := s.treeHeads[treeId]
|
curTreeHeads, ok := s.treeHeads[treeId]
|
||||||
if !ok || curTreeHeads.syncStatus == SyncStatusSynced {
|
if !ok || curTreeHeads.syncStatus == StatusSynced {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -212,7 +212,7 @@ func (s *syncStatusProvider) HeadsReceive(senderId, treeId string, heads []strin
|
|||||||
return h == ""
|
return h == ""
|
||||||
})
|
})
|
||||||
if len(curTreeHeads.heads) == 0 {
|
if len(curTreeHeads.heads) == 0 {
|
||||||
curTreeHeads.syncStatus = SyncStatusSynced
|
curTreeHeads.syncStatus = StatusSynced
|
||||||
}
|
}
|
||||||
s.treeHeads[treeId] = curTreeHeads
|
s.treeHeads[treeId] = curTreeHeads
|
||||||
}
|
}
|
||||||
@ -239,7 +239,7 @@ func (s *syncStatusProvider) Watch(treeId string) (err error) {
|
|||||||
s.treeHeads[treeId] = treeHeadsEntry{
|
s.treeHeads[treeId] = treeHeadsEntry{
|
||||||
heads: heads,
|
heads: heads,
|
||||||
stateCounter: s.stateCounter,
|
stateCounter: s.stateCounter,
|
||||||
syncStatus: SyncStatusUnknown,
|
syncStatus: StatusUnknown,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -285,7 +285,7 @@ func (s *syncStatusProvider) RemoveAllExcept(senderId string, differentRemoteIds
|
|||||||
}
|
}
|
||||||
// if we didn't find our treeId in heads ids which are different from us and node
|
// if we didn't find our treeId in heads ids which are different from us and node
|
||||||
if _, found := slices.BinarySearch(differentRemoteIds, treeId); !found {
|
if _, found := slices.BinarySearch(differentRemoteIds, treeId); !found {
|
||||||
entry.syncStatus = SyncStatusSynced
|
entry.syncStatus = StatusSynced
|
||||||
s.treeHeads[treeId] = entry
|
s.treeHeads[treeId] = entry
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,4 +10,4 @@ test:
|
|||||||
|
|
||||||
proto:
|
proto:
|
||||||
@$(eval GOGO_START := GOGO_NO_UNDERSCORE=1 GOGO_EXPORT_ONEOF_INTERFACE=1)
|
@$(eval GOGO_START := GOGO_NO_UNDERSCORE=1 GOGO_EXPORT_ONEOF_INTERFACE=1)
|
||||||
$(GOGO_START) protoc --gogofaster_out=:. --go-drpc_out=protolib=github.com/gogo/protobuf:. api/apiproto/protos/*.proto
|
$(GOGO_START) protoc --gogofaster_out=:. --go-drpc_out=protolib=github.com/gogo/protobuf:. debug/nodedebugrpc/nodedebugrpcproto/protos/*.proto
|
||||||
@ -15,7 +15,7 @@ import (
|
|||||||
"storj.io/drpc"
|
"storj.io/drpc"
|
||||||
)
|
)
|
||||||
|
|
||||||
const CName = "debug.nodedebugrpc"
|
const CName = "node.debug.nodedebugrpc"
|
||||||
|
|
||||||
var log = logger.NewNamed(CName)
|
var log = logger.NewNamed(CName)
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||||
// source: api/apiproto/protos/api.proto
|
// source: debug/nodedebugrpc/nodedebugrpcproto/protos/nodedebugrpc.proto
|
||||||
|
|
||||||
package nodedebugrpcproto
|
package nodedebugrpcproto
|
||||||
|
|
||||||
@ -31,7 +31,7 @@ func (m *DumpTreeRequest) Reset() { *m = DumpTreeRequest{} }
|
|||||||
func (m *DumpTreeRequest) String() string { return proto.CompactTextString(m) }
|
func (m *DumpTreeRequest) String() string { return proto.CompactTextString(m) }
|
||||||
func (*DumpTreeRequest) ProtoMessage() {}
|
func (*DumpTreeRequest) ProtoMessage() {}
|
||||||
func (*DumpTreeRequest) Descriptor() ([]byte, []int) {
|
func (*DumpTreeRequest) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_fc31080c27db9707, []int{0}
|
return fileDescriptor_783a24b01ebd5381, []int{0}
|
||||||
}
|
}
|
||||||
func (m *DumpTreeRequest) XXX_Unmarshal(b []byte) error {
|
func (m *DumpTreeRequest) XXX_Unmarshal(b []byte) error {
|
||||||
return m.Unmarshal(b)
|
return m.Unmarshal(b)
|
||||||
@ -82,7 +82,7 @@ func (m *DumpTreeResponse) Reset() { *m = DumpTreeResponse{} }
|
|||||||
func (m *DumpTreeResponse) String() string { return proto.CompactTextString(m) }
|
func (m *DumpTreeResponse) String() string { return proto.CompactTextString(m) }
|
||||||
func (*DumpTreeResponse) ProtoMessage() {}
|
func (*DumpTreeResponse) ProtoMessage() {}
|
||||||
func (*DumpTreeResponse) Descriptor() ([]byte, []int) {
|
func (*DumpTreeResponse) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_fc31080c27db9707, []int{1}
|
return fileDescriptor_783a24b01ebd5381, []int{1}
|
||||||
}
|
}
|
||||||
func (m *DumpTreeResponse) XXX_Unmarshal(b []byte) error {
|
func (m *DumpTreeResponse) XXX_Unmarshal(b []byte) error {
|
||||||
return m.Unmarshal(b)
|
return m.Unmarshal(b)
|
||||||
@ -126,7 +126,7 @@ func (m *AllTreesRequest) Reset() { *m = AllTreesRequest{} }
|
|||||||
func (m *AllTreesRequest) String() string { return proto.CompactTextString(m) }
|
func (m *AllTreesRequest) String() string { return proto.CompactTextString(m) }
|
||||||
func (*AllTreesRequest) ProtoMessage() {}
|
func (*AllTreesRequest) ProtoMessage() {}
|
||||||
func (*AllTreesRequest) Descriptor() ([]byte, []int) {
|
func (*AllTreesRequest) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_fc31080c27db9707, []int{2}
|
return fileDescriptor_783a24b01ebd5381, []int{2}
|
||||||
}
|
}
|
||||||
func (m *AllTreesRequest) XXX_Unmarshal(b []byte) error {
|
func (m *AllTreesRequest) XXX_Unmarshal(b []byte) error {
|
||||||
return m.Unmarshal(b)
|
return m.Unmarshal(b)
|
||||||
@ -171,7 +171,7 @@ func (m *Tree) Reset() { *m = Tree{} }
|
|||||||
func (m *Tree) String() string { return proto.CompactTextString(m) }
|
func (m *Tree) String() string { return proto.CompactTextString(m) }
|
||||||
func (*Tree) ProtoMessage() {}
|
func (*Tree) ProtoMessage() {}
|
||||||
func (*Tree) Descriptor() ([]byte, []int) {
|
func (*Tree) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_fc31080c27db9707, []int{3}
|
return fileDescriptor_783a24b01ebd5381, []int{3}
|
||||||
}
|
}
|
||||||
func (m *Tree) XXX_Unmarshal(b []byte) error {
|
func (m *Tree) XXX_Unmarshal(b []byte) error {
|
||||||
return m.Unmarshal(b)
|
return m.Unmarshal(b)
|
||||||
@ -222,7 +222,7 @@ func (m *AllTreesResponse) Reset() { *m = AllTreesResponse{} }
|
|||||||
func (m *AllTreesResponse) String() string { return proto.CompactTextString(m) }
|
func (m *AllTreesResponse) String() string { return proto.CompactTextString(m) }
|
||||||
func (*AllTreesResponse) ProtoMessage() {}
|
func (*AllTreesResponse) ProtoMessage() {}
|
||||||
func (*AllTreesResponse) Descriptor() ([]byte, []int) {
|
func (*AllTreesResponse) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_fc31080c27db9707, []int{4}
|
return fileDescriptor_783a24b01ebd5381, []int{4}
|
||||||
}
|
}
|
||||||
func (m *AllTreesResponse) XXX_Unmarshal(b []byte) error {
|
func (m *AllTreesResponse) XXX_Unmarshal(b []byte) error {
|
||||||
return m.Unmarshal(b)
|
return m.Unmarshal(b)
|
||||||
@ -265,7 +265,7 @@ func (m *AllSpacesRequest) Reset() { *m = AllSpacesRequest{} }
|
|||||||
func (m *AllSpacesRequest) String() string { return proto.CompactTextString(m) }
|
func (m *AllSpacesRequest) String() string { return proto.CompactTextString(m) }
|
||||||
func (*AllSpacesRequest) ProtoMessage() {}
|
func (*AllSpacesRequest) ProtoMessage() {}
|
||||||
func (*AllSpacesRequest) Descriptor() ([]byte, []int) {
|
func (*AllSpacesRequest) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_fc31080c27db9707, []int{5}
|
return fileDescriptor_783a24b01ebd5381, []int{5}
|
||||||
}
|
}
|
||||||
func (m *AllSpacesRequest) XXX_Unmarshal(b []byte) error {
|
func (m *AllSpacesRequest) XXX_Unmarshal(b []byte) error {
|
||||||
return m.Unmarshal(b)
|
return m.Unmarshal(b)
|
||||||
@ -302,7 +302,7 @@ func (m *AllSpacesResponse) Reset() { *m = AllSpacesResponse{} }
|
|||||||
func (m *AllSpacesResponse) String() string { return proto.CompactTextString(m) }
|
func (m *AllSpacesResponse) String() string { return proto.CompactTextString(m) }
|
||||||
func (*AllSpacesResponse) ProtoMessage() {}
|
func (*AllSpacesResponse) ProtoMessage() {}
|
||||||
func (*AllSpacesResponse) Descriptor() ([]byte, []int) {
|
func (*AllSpacesResponse) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_fc31080c27db9707, []int{6}
|
return fileDescriptor_783a24b01ebd5381, []int{6}
|
||||||
}
|
}
|
||||||
func (m *AllSpacesResponse) XXX_Unmarshal(b []byte) error {
|
func (m *AllSpacesResponse) XXX_Unmarshal(b []byte) error {
|
||||||
return m.Unmarshal(b)
|
return m.Unmarshal(b)
|
||||||
@ -347,7 +347,7 @@ func (m *TreeParamsRequest) Reset() { *m = TreeParamsRequest{} }
|
|||||||
func (m *TreeParamsRequest) String() string { return proto.CompactTextString(m) }
|
func (m *TreeParamsRequest) String() string { return proto.CompactTextString(m) }
|
||||||
func (*TreeParamsRequest) ProtoMessage() {}
|
func (*TreeParamsRequest) ProtoMessage() {}
|
||||||
func (*TreeParamsRequest) Descriptor() ([]byte, []int) {
|
func (*TreeParamsRequest) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_fc31080c27db9707, []int{7}
|
return fileDescriptor_783a24b01ebd5381, []int{7}
|
||||||
}
|
}
|
||||||
func (m *TreeParamsRequest) XXX_Unmarshal(b []byte) error {
|
func (m *TreeParamsRequest) XXX_Unmarshal(b []byte) error {
|
||||||
return m.Unmarshal(b)
|
return m.Unmarshal(b)
|
||||||
@ -399,7 +399,7 @@ func (m *TreeParamsResponse) Reset() { *m = TreeParamsResponse{} }
|
|||||||
func (m *TreeParamsResponse) String() string { return proto.CompactTextString(m) }
|
func (m *TreeParamsResponse) String() string { return proto.CompactTextString(m) }
|
||||||
func (*TreeParamsResponse) ProtoMessage() {}
|
func (*TreeParamsResponse) ProtoMessage() {}
|
||||||
func (*TreeParamsResponse) Descriptor() ([]byte, []int) {
|
func (*TreeParamsResponse) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_fc31080c27db9707, []int{8}
|
return fileDescriptor_783a24b01ebd5381, []int{8}
|
||||||
}
|
}
|
||||||
func (m *TreeParamsResponse) XXX_Unmarshal(b []byte) error {
|
func (m *TreeParamsResponse) XXX_Unmarshal(b []byte) error {
|
||||||
return m.Unmarshal(b)
|
return m.Unmarshal(b)
|
||||||
@ -454,35 +454,38 @@ func init() {
|
|||||||
proto.RegisterType((*TreeParamsResponse)(nil), "nodeapi.TreeParamsResponse")
|
proto.RegisterType((*TreeParamsResponse)(nil), "nodeapi.TreeParamsResponse")
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { proto.RegisterFile("api/apiproto/protos/api.proto", fileDescriptor_fc31080c27db9707) }
|
func init() {
|
||||||
|
proto.RegisterFile("debug/nodedebugrpc/nodedebugrpcproto/protos/nodedebugrpc.proto", fileDescriptor_783a24b01ebd5381)
|
||||||
|
}
|
||||||
|
|
||||||
var fileDescriptor_fc31080c27db9707 = []byte{
|
var fileDescriptor_783a24b01ebd5381 = []byte{
|
||||||
// 394 bytes of a gzipped FileDescriptorProto
|
// 406 bytes of a gzipped FileDescriptorProto
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x53, 0xcd, 0x4a, 0xf3, 0x40,
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x53, 0xcf, 0x6b, 0xdb, 0x30,
|
||||||
0x14, 0x6d, 0xd2, 0xdf, 0xdc, 0xef, 0xa7, 0xed, 0x20, 0x12, 0x23, 0x86, 0x32, 0x42, 0x29, 0x28,
|
0x18, 0x8d, 0x9d, 0x9f, 0xfe, 0xc6, 0x96, 0x44, 0x8c, 0xe1, 0x79, 0x60, 0x82, 0x36, 0x46, 0x60,
|
||||||
0x2d, 0xd4, 0x85, 0xcb, 0xd2, 0xa2, 0x42, 0x11, 0x45, 0xa2, 0x2b, 0x77, 0xb1, 0x33, 0x60, 0xa0,
|
0x23, 0x81, 0xec, 0xb0, 0x5b, 0x42, 0xc2, 0x36, 0x08, 0xa3, 0xa5, 0xb8, 0x3d, 0xf5, 0xe6, 0x44,
|
||||||
0xe9, 0x8c, 0x99, 0xe4, 0x3d, 0x5c, 0xf9, 0x4c, 0x2e, 0xbb, 0x74, 0x29, 0xed, 0x8b, 0xc8, 0x24,
|
0xa2, 0x35, 0xc4, 0x91, 0x6a, 0xd9, 0xff, 0x47, 0x4f, 0xfd, 0x9b, 0x7a, 0xcc, 0xb1, 0xc7, 0x92,
|
||||||
0x93, 0x34, 0xa9, 0x05, 0x17, 0x6e, 0x92, 0x39, 0x73, 0x6e, 0xce, 0x3d, 0x73, 0xcf, 0x04, 0x8e,
|
0xfc, 0x23, 0x45, 0xb2, 0xec, 0xd8, 0x69, 0xa0, 0x85, 0x5e, 0x6c, 0xbd, 0xef, 0xc9, 0xef, 0x7b,
|
||||||
0x5c, 0xee, 0x0d, 0x5c, 0xee, 0xf1, 0x80, 0x85, 0x6c, 0x10, 0x3f, 0x85, 0xc4, 0xfd, 0x78, 0x89,
|
0xfa, 0x9e, 0x0c, 0x63, 0x42, 0x17, 0xc9, 0xd5, 0x70, 0xcd, 0x08, 0x55, 0xab, 0x88, 0x2f, 0x4b,
|
||||||
0xea, 0x0b, 0x46, 0xa8, 0xcb, 0x3d, 0x7c, 0x0d, 0xcd, 0x8b, 0xc8, 0xe7, 0x0f, 0x01, 0xa5, 0x0e,
|
0x80, 0x47, 0x2c, 0x66, 0x43, 0xf5, 0x14, 0x25, 0x62, 0xa0, 0x6a, 0xa8, 0x29, 0x6b, 0x3e, 0x0f,
|
||||||
0x7d, 0x89, 0xa8, 0x08, 0x91, 0x09, 0x75, 0xc1, 0xdd, 0x19, 0x9d, 0x12, 0x53, 0xeb, 0x68, 0x3d,
|
0xf0, 0x7f, 0x68, 0xff, 0x49, 0x42, 0x7e, 0x11, 0x51, 0xea, 0xd1, 0x9b, 0x84, 0x8a, 0x18, 0xd9,
|
||||||
0xc3, 0x49, 0x21, 0xb2, 0x01, 0x08, 0x9b, 0x45, 0x3e, 0x5d, 0x84, 0x53, 0x62, 0xea, 0x31, 0x99,
|
0xd0, 0x14, 0xdc, 0x5f, 0xd2, 0x39, 0xb1, 0x8d, 0x9e, 0xd1, 0xb7, 0xbc, 0x0c, 0x22, 0x17, 0x80,
|
||||||
0xdb, 0xc1, 0x5d, 0x68, 0x6d, 0xc4, 0x04, 0x67, 0x0b, 0x41, 0x11, 0x82, 0x0a, 0x89, 0x7c, 0xae,
|
0xb0, 0x65, 0x12, 0xd2, 0x75, 0x3c, 0x27, 0xb6, 0xa9, 0xc8, 0x42, 0x05, 0x7f, 0x87, 0xce, 0x5e,
|
||||||
0xa4, 0xe2, 0x35, 0x3e, 0x81, 0xe6, 0x78, 0x3e, 0x97, 0x65, 0xe2, 0xc7, 0xa6, 0xf8, 0x14, 0x2a,
|
0x4c, 0x70, 0xb6, 0x16, 0x14, 0x21, 0xa8, 0x91, 0x24, 0xe4, 0x5a, 0x4a, 0xad, 0xf1, 0x0f, 0x68,
|
||||||
0xb2, 0x12, 0xfd, 0x07, 0xdd, 0x4b, 0x49, 0xdd, 0x23, 0x68, 0x0f, 0xaa, 0xcf, 0xd4, 0x25, 0xc2,
|
0x4f, 0x57, 0x2b, 0xb9, 0x4d, 0xbc, 0xd8, 0x14, 0xff, 0x84, 0x9a, 0xdc, 0x89, 0x3e, 0x80, 0x19,
|
||||||
0xd4, 0x3b, 0xe5, 0x9e, 0xe1, 0x24, 0x00, 0x9f, 0x43, 0x6b, 0x23, 0xad, 0x2c, 0x1c, 0x43, 0x35,
|
0x64, 0xa4, 0x19, 0x10, 0xf4, 0x11, 0xea, 0xd7, 0xd4, 0x27, 0xc2, 0x36, 0x7b, 0xd5, 0xbe, 0xe5,
|
||||||
0x94, 0x1b, 0xa6, 0xd6, 0x29, 0xf7, 0xfe, 0x0c, 0xff, 0xf5, 0xd5, 0xe1, 0xfb, 0xb1, 0xd1, 0x84,
|
0xa5, 0x00, 0xff, 0x86, 0xce, 0x5e, 0x5a, 0x5b, 0xf8, 0x0a, 0xf5, 0x58, 0x16, 0x6c, 0xa3, 0x57,
|
||||||
0xc3, 0x28, 0xfe, 0xf0, 0x5e, 0x36, 0x4d, 0x4d, 0xe1, 0x01, 0xb4, 0x73, 0x7b, 0x4a, 0xcd, 0x82,
|
0xed, 0xbf, 0x1b, 0xbd, 0x1f, 0xe8, 0xc3, 0x0f, 0x94, 0xd1, 0x94, 0xc3, 0x48, 0x7d, 0x78, 0x2e,
|
||||||
0x86, 0xb2, 0x96, 0x08, 0x1a, 0x4e, 0x86, 0xf1, 0x0d, 0xb4, 0xa5, 0xe6, 0x9d, 0x1b, 0xb8, 0xbe,
|
0x9b, 0x66, 0xa6, 0xf0, 0x10, 0xba, 0x85, 0x9a, 0x56, 0x73, 0xa0, 0xa5, 0xad, 0xa5, 0x82, 0x96,
|
||||||
0xf8, 0xfd, 0x3c, 0xaf, 0x00, 0xe5, 0xe5, 0x94, 0x81, 0x7d, 0xa8, 0x05, 0x8c, 0x85, 0x99, 0x9c,
|
0x97, 0x63, 0x7c, 0x02, 0x5d, 0xa9, 0x79, 0xe6, 0x47, 0x7e, 0x28, 0xde, 0x3e, 0xcf, 0x7f, 0x80,
|
||||||
0x42, 0xb2, 0x8f, 0x9c, 0xc1, 0x34, 0x1b, 0x49, 0x0a, 0x87, 0x6f, 0x3a, 0xd4, 0x6f, 0x19, 0xa1,
|
0x8a, 0x72, 0xda, 0xc0, 0x27, 0x68, 0x44, 0x8c, 0xc5, 0xb9, 0x9c, 0x46, 0xb2, 0x8f, 0x9c, 0xc1,
|
||||||
0x63, 0xee, 0xa1, 0x11, 0x34, 0xd2, 0x8c, 0x90, 0x99, 0x4d, 0x62, 0xeb, 0x0e, 0x58, 0x07, 0x3b,
|
0x3c, 0x1f, 0x49, 0x06, 0x47, 0x77, 0x26, 0x34, 0x4f, 0x19, 0xa1, 0x53, 0x1e, 0xa0, 0x09, 0xb4,
|
||||||
0x18, 0xd5, 0xfe, 0x12, 0x60, 0x63, 0x0a, 0x59, 0x85, 0x61, 0x16, 0x0e, 0x6e, 0x1d, 0xee, 0xe4,
|
0xb2, 0x8c, 0x90, 0x9d, 0x4f, 0xe2, 0xe0, 0x0e, 0x38, 0x9f, 0x8f, 0x30, 0xba, 0xfd, 0x5f, 0x80,
|
||||||
0x94, 0xcc, 0x08, 0x1a, 0x69, 0x50, 0x39, 0x1f, 0x5b, 0xd7, 0x22, 0xe7, 0xe3, 0x5b, 0xaa, 0x13,
|
0xbd, 0x29, 0xe4, 0x94, 0x86, 0x59, 0x3a, 0xb8, 0xf3, 0xe5, 0x28, 0xa7, 0x65, 0x26, 0xd0, 0xca,
|
||||||
0x30, 0xb2, 0x70, 0x50, 0xa1, 0xae, 0x10, 0xa2, 0x65, 0xed, 0xa2, 0x12, 0x8d, 0x49, 0xf7, 0x7d,
|
0x82, 0x2a, 0xf8, 0x38, 0xb8, 0x16, 0x05, 0x1f, 0xcf, 0x52, 0x9d, 0x81, 0x95, 0x87, 0x83, 0x4a,
|
||||||
0x65, 0x6b, 0xcb, 0x95, 0xad, 0x7d, 0xae, 0x6c, 0xed, 0x75, 0x6d, 0x97, 0x96, 0x6b, 0xbb, 0xf4,
|
0xfb, 0x4a, 0x21, 0x3a, 0xce, 0x31, 0x2a, 0xd5, 0x98, 0x8d, 0xef, 0xb7, 0xae, 0xb1, 0xd9, 0xba,
|
||||||
0xb1, 0xb6, 0x4b, 0x8f, 0x7f, 0xf3, 0xff, 0xcf, 0x53, 0x2d, 0x7e, 0x9d, 0x7d, 0x05, 0x00, 0x00,
|
0xc6, 0xe3, 0xd6, 0x35, 0x6e, 0x77, 0x6e, 0x65, 0xb3, 0x73, 0x2b, 0x0f, 0x3b, 0xb7, 0x72, 0xf9,
|
||||||
0xff, 0xff, 0xb6, 0x98, 0xe5, 0x1d, 0x56, 0x03, 0x00, 0x00,
|
0xed, 0x35, 0x3f, 0xd8, 0xa2, 0xa1, 0x5e, 0xbf, 0x9e, 0x02, 0x00, 0x00, 0xff, 0xff, 0xac, 0x0e,
|
||||||
|
0xb9, 0x90, 0x8f, 0x03, 0x00, 0x00,
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *DumpTreeRequest) Marshal() (dAtA []byte, err error) {
|
func (m *DumpTreeRequest) Marshal() (dAtA []byte, err error) {
|
||||||
@ -508,14 +511,14 @@ func (m *DumpTreeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|||||||
if len(m.DocumentId) > 0 {
|
if len(m.DocumentId) > 0 {
|
||||||
i -= len(m.DocumentId)
|
i -= len(m.DocumentId)
|
||||||
copy(dAtA[i:], m.DocumentId)
|
copy(dAtA[i:], m.DocumentId)
|
||||||
i = encodeVarintApi(dAtA, i, uint64(len(m.DocumentId)))
|
i = encodeVarintNodedebugrpc(dAtA, i, uint64(len(m.DocumentId)))
|
||||||
i--
|
i--
|
||||||
dAtA[i] = 0x12
|
dAtA[i] = 0x12
|
||||||
}
|
}
|
||||||
if len(m.SpaceId) > 0 {
|
if len(m.SpaceId) > 0 {
|
||||||
i -= len(m.SpaceId)
|
i -= len(m.SpaceId)
|
||||||
copy(dAtA[i:], m.SpaceId)
|
copy(dAtA[i:], m.SpaceId)
|
||||||
i = encodeVarintApi(dAtA, i, uint64(len(m.SpaceId)))
|
i = encodeVarintNodedebugrpc(dAtA, i, uint64(len(m.SpaceId)))
|
||||||
i--
|
i--
|
||||||
dAtA[i] = 0xa
|
dAtA[i] = 0xa
|
||||||
}
|
}
|
||||||
@ -545,7 +548,7 @@ func (m *DumpTreeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|||||||
if len(m.Dump) > 0 {
|
if len(m.Dump) > 0 {
|
||||||
i -= len(m.Dump)
|
i -= len(m.Dump)
|
||||||
copy(dAtA[i:], m.Dump)
|
copy(dAtA[i:], m.Dump)
|
||||||
i = encodeVarintApi(dAtA, i, uint64(len(m.Dump)))
|
i = encodeVarintNodedebugrpc(dAtA, i, uint64(len(m.Dump)))
|
||||||
i--
|
i--
|
||||||
dAtA[i] = 0xa
|
dAtA[i] = 0xa
|
||||||
}
|
}
|
||||||
@ -575,7 +578,7 @@ func (m *AllTreesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|||||||
if len(m.SpaceId) > 0 {
|
if len(m.SpaceId) > 0 {
|
||||||
i -= len(m.SpaceId)
|
i -= len(m.SpaceId)
|
||||||
copy(dAtA[i:], m.SpaceId)
|
copy(dAtA[i:], m.SpaceId)
|
||||||
i = encodeVarintApi(dAtA, i, uint64(len(m.SpaceId)))
|
i = encodeVarintNodedebugrpc(dAtA, i, uint64(len(m.SpaceId)))
|
||||||
i--
|
i--
|
||||||
dAtA[i] = 0xa
|
dAtA[i] = 0xa
|
||||||
}
|
}
|
||||||
@ -606,7 +609,7 @@ func (m *Tree) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|||||||
for iNdEx := len(m.Heads) - 1; iNdEx >= 0; iNdEx-- {
|
for iNdEx := len(m.Heads) - 1; iNdEx >= 0; iNdEx-- {
|
||||||
i -= len(m.Heads[iNdEx])
|
i -= len(m.Heads[iNdEx])
|
||||||
copy(dAtA[i:], m.Heads[iNdEx])
|
copy(dAtA[i:], m.Heads[iNdEx])
|
||||||
i = encodeVarintApi(dAtA, i, uint64(len(m.Heads[iNdEx])))
|
i = encodeVarintNodedebugrpc(dAtA, i, uint64(len(m.Heads[iNdEx])))
|
||||||
i--
|
i--
|
||||||
dAtA[i] = 0x12
|
dAtA[i] = 0x12
|
||||||
}
|
}
|
||||||
@ -614,7 +617,7 @@ func (m *Tree) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|||||||
if len(m.Id) > 0 {
|
if len(m.Id) > 0 {
|
||||||
i -= len(m.Id)
|
i -= len(m.Id)
|
||||||
copy(dAtA[i:], m.Id)
|
copy(dAtA[i:], m.Id)
|
||||||
i = encodeVarintApi(dAtA, i, uint64(len(m.Id)))
|
i = encodeVarintNodedebugrpc(dAtA, i, uint64(len(m.Id)))
|
||||||
i--
|
i--
|
||||||
dAtA[i] = 0xa
|
dAtA[i] = 0xa
|
||||||
}
|
}
|
||||||
@ -649,7 +652,7 @@ func (m *AllTreesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|||||||
return 0, err
|
return 0, err
|
||||||
}
|
}
|
||||||
i -= size
|
i -= size
|
||||||
i = encodeVarintApi(dAtA, i, uint64(size))
|
i = encodeVarintNodedebugrpc(dAtA, i, uint64(size))
|
||||||
}
|
}
|
||||||
i--
|
i--
|
||||||
dAtA[i] = 0xa
|
dAtA[i] = 0xa
|
||||||
@ -705,7 +708,7 @@ func (m *AllSpacesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|||||||
for iNdEx := len(m.SpaceIds) - 1; iNdEx >= 0; iNdEx-- {
|
for iNdEx := len(m.SpaceIds) - 1; iNdEx >= 0; iNdEx-- {
|
||||||
i -= len(m.SpaceIds[iNdEx])
|
i -= len(m.SpaceIds[iNdEx])
|
||||||
copy(dAtA[i:], m.SpaceIds[iNdEx])
|
copy(dAtA[i:], m.SpaceIds[iNdEx])
|
||||||
i = encodeVarintApi(dAtA, i, uint64(len(m.SpaceIds[iNdEx])))
|
i = encodeVarintNodedebugrpc(dAtA, i, uint64(len(m.SpaceIds[iNdEx])))
|
||||||
i--
|
i--
|
||||||
dAtA[i] = 0xa
|
dAtA[i] = 0xa
|
||||||
}
|
}
|
||||||
@ -736,14 +739,14 @@ func (m *TreeParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|||||||
if len(m.DocumentId) > 0 {
|
if len(m.DocumentId) > 0 {
|
||||||
i -= len(m.DocumentId)
|
i -= len(m.DocumentId)
|
||||||
copy(dAtA[i:], m.DocumentId)
|
copy(dAtA[i:], m.DocumentId)
|
||||||
i = encodeVarintApi(dAtA, i, uint64(len(m.DocumentId)))
|
i = encodeVarintNodedebugrpc(dAtA, i, uint64(len(m.DocumentId)))
|
||||||
i--
|
i--
|
||||||
dAtA[i] = 0x12
|
dAtA[i] = 0x12
|
||||||
}
|
}
|
||||||
if len(m.SpaceId) > 0 {
|
if len(m.SpaceId) > 0 {
|
||||||
i -= len(m.SpaceId)
|
i -= len(m.SpaceId)
|
||||||
copy(dAtA[i:], m.SpaceId)
|
copy(dAtA[i:], m.SpaceId)
|
||||||
i = encodeVarintApi(dAtA, i, uint64(len(m.SpaceId)))
|
i = encodeVarintNodedebugrpc(dAtA, i, uint64(len(m.SpaceId)))
|
||||||
i--
|
i--
|
||||||
dAtA[i] = 0xa
|
dAtA[i] = 0xa
|
||||||
}
|
}
|
||||||
@ -774,7 +777,7 @@ func (m *TreeParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|||||||
for iNdEx := len(m.HeadIds) - 1; iNdEx >= 0; iNdEx-- {
|
for iNdEx := len(m.HeadIds) - 1; iNdEx >= 0; iNdEx-- {
|
||||||
i -= len(m.HeadIds[iNdEx])
|
i -= len(m.HeadIds[iNdEx])
|
||||||
copy(dAtA[i:], m.HeadIds[iNdEx])
|
copy(dAtA[i:], m.HeadIds[iNdEx])
|
||||||
i = encodeVarintApi(dAtA, i, uint64(len(m.HeadIds[iNdEx])))
|
i = encodeVarintNodedebugrpc(dAtA, i, uint64(len(m.HeadIds[iNdEx])))
|
||||||
i--
|
i--
|
||||||
dAtA[i] = 0x12
|
dAtA[i] = 0x12
|
||||||
}
|
}
|
||||||
@ -782,15 +785,15 @@ func (m *TreeParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|||||||
if len(m.RootId) > 0 {
|
if len(m.RootId) > 0 {
|
||||||
i -= len(m.RootId)
|
i -= len(m.RootId)
|
||||||
copy(dAtA[i:], m.RootId)
|
copy(dAtA[i:], m.RootId)
|
||||||
i = encodeVarintApi(dAtA, i, uint64(len(m.RootId)))
|
i = encodeVarintNodedebugrpc(dAtA, i, uint64(len(m.RootId)))
|
||||||
i--
|
i--
|
||||||
dAtA[i] = 0xa
|
dAtA[i] = 0xa
|
||||||
}
|
}
|
||||||
return len(dAtA) - i, nil
|
return len(dAtA) - i, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func encodeVarintApi(dAtA []byte, offset int, v uint64) int {
|
func encodeVarintNodedebugrpc(dAtA []byte, offset int, v uint64) int {
|
||||||
offset -= sovApi(v)
|
offset -= sovNodedebugrpc(v)
|
||||||
base := offset
|
base := offset
|
||||||
for v >= 1<<7 {
|
for v >= 1<<7 {
|
||||||
dAtA[offset] = uint8(v&0x7f | 0x80)
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
||||||
@ -808,11 +811,11 @@ func (m *DumpTreeRequest) Size() (n int) {
|
|||||||
_ = l
|
_ = l
|
||||||
l = len(m.SpaceId)
|
l = len(m.SpaceId)
|
||||||
if l > 0 {
|
if l > 0 {
|
||||||
n += 1 + l + sovApi(uint64(l))
|
n += 1 + l + sovNodedebugrpc(uint64(l))
|
||||||
}
|
}
|
||||||
l = len(m.DocumentId)
|
l = len(m.DocumentId)
|
||||||
if l > 0 {
|
if l > 0 {
|
||||||
n += 1 + l + sovApi(uint64(l))
|
n += 1 + l + sovNodedebugrpc(uint64(l))
|
||||||
}
|
}
|
||||||
return n
|
return n
|
||||||
}
|
}
|
||||||
@ -825,7 +828,7 @@ func (m *DumpTreeResponse) Size() (n int) {
|
|||||||
_ = l
|
_ = l
|
||||||
l = len(m.Dump)
|
l = len(m.Dump)
|
||||||
if l > 0 {
|
if l > 0 {
|
||||||
n += 1 + l + sovApi(uint64(l))
|
n += 1 + l + sovNodedebugrpc(uint64(l))
|
||||||
}
|
}
|
||||||
return n
|
return n
|
||||||
}
|
}
|
||||||
@ -838,7 +841,7 @@ func (m *AllTreesRequest) Size() (n int) {
|
|||||||
_ = l
|
_ = l
|
||||||
l = len(m.SpaceId)
|
l = len(m.SpaceId)
|
||||||
if l > 0 {
|
if l > 0 {
|
||||||
n += 1 + l + sovApi(uint64(l))
|
n += 1 + l + sovNodedebugrpc(uint64(l))
|
||||||
}
|
}
|
||||||
return n
|
return n
|
||||||
}
|
}
|
||||||
@ -851,12 +854,12 @@ func (m *Tree) Size() (n int) {
|
|||||||
_ = l
|
_ = l
|
||||||
l = len(m.Id)
|
l = len(m.Id)
|
||||||
if l > 0 {
|
if l > 0 {
|
||||||
n += 1 + l + sovApi(uint64(l))
|
n += 1 + l + sovNodedebugrpc(uint64(l))
|
||||||
}
|
}
|
||||||
if len(m.Heads) > 0 {
|
if len(m.Heads) > 0 {
|
||||||
for _, s := range m.Heads {
|
for _, s := range m.Heads {
|
||||||
l = len(s)
|
l = len(s)
|
||||||
n += 1 + l + sovApi(uint64(l))
|
n += 1 + l + sovNodedebugrpc(uint64(l))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return n
|
return n
|
||||||
@ -871,7 +874,7 @@ func (m *AllTreesResponse) Size() (n int) {
|
|||||||
if len(m.Trees) > 0 {
|
if len(m.Trees) > 0 {
|
||||||
for _, e := range m.Trees {
|
for _, e := range m.Trees {
|
||||||
l = e.Size()
|
l = e.Size()
|
||||||
n += 1 + l + sovApi(uint64(l))
|
n += 1 + l + sovNodedebugrpc(uint64(l))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return n
|
return n
|
||||||
@ -895,7 +898,7 @@ func (m *AllSpacesResponse) Size() (n int) {
|
|||||||
if len(m.SpaceIds) > 0 {
|
if len(m.SpaceIds) > 0 {
|
||||||
for _, s := range m.SpaceIds {
|
for _, s := range m.SpaceIds {
|
||||||
l = len(s)
|
l = len(s)
|
||||||
n += 1 + l + sovApi(uint64(l))
|
n += 1 + l + sovNodedebugrpc(uint64(l))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return n
|
return n
|
||||||
@ -909,11 +912,11 @@ func (m *TreeParamsRequest) Size() (n int) {
|
|||||||
_ = l
|
_ = l
|
||||||
l = len(m.SpaceId)
|
l = len(m.SpaceId)
|
||||||
if l > 0 {
|
if l > 0 {
|
||||||
n += 1 + l + sovApi(uint64(l))
|
n += 1 + l + sovNodedebugrpc(uint64(l))
|
||||||
}
|
}
|
||||||
l = len(m.DocumentId)
|
l = len(m.DocumentId)
|
||||||
if l > 0 {
|
if l > 0 {
|
||||||
n += 1 + l + sovApi(uint64(l))
|
n += 1 + l + sovNodedebugrpc(uint64(l))
|
||||||
}
|
}
|
||||||
return n
|
return n
|
||||||
}
|
}
|
||||||
@ -926,22 +929,22 @@ func (m *TreeParamsResponse) Size() (n int) {
|
|||||||
_ = l
|
_ = l
|
||||||
l = len(m.RootId)
|
l = len(m.RootId)
|
||||||
if l > 0 {
|
if l > 0 {
|
||||||
n += 1 + l + sovApi(uint64(l))
|
n += 1 + l + sovNodedebugrpc(uint64(l))
|
||||||
}
|
}
|
||||||
if len(m.HeadIds) > 0 {
|
if len(m.HeadIds) > 0 {
|
||||||
for _, s := range m.HeadIds {
|
for _, s := range m.HeadIds {
|
||||||
l = len(s)
|
l = len(s)
|
||||||
n += 1 + l + sovApi(uint64(l))
|
n += 1 + l + sovNodedebugrpc(uint64(l))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return n
|
return n
|
||||||
}
|
}
|
||||||
|
|
||||||
func sovApi(x uint64) (n int) {
|
func sovNodedebugrpc(x uint64) (n int) {
|
||||||
return (math_bits.Len64(x|1) + 6) / 7
|
return (math_bits.Len64(x|1) + 6) / 7
|
||||||
}
|
}
|
||||||
func sozApi(x uint64) (n int) {
|
func sozNodedebugrpc(x uint64) (n int) {
|
||||||
return sovApi(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
return sovNodedebugrpc(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||||
}
|
}
|
||||||
func (m *DumpTreeRequest) Unmarshal(dAtA []byte) error {
|
func (m *DumpTreeRequest) Unmarshal(dAtA []byte) error {
|
||||||
l := len(dAtA)
|
l := len(dAtA)
|
||||||
@ -951,7 +954,7 @@ func (m *DumpTreeRequest) Unmarshal(dAtA []byte) error {
|
|||||||
var wire uint64
|
var wire uint64
|
||||||
for shift := uint(0); ; shift += 7 {
|
for shift := uint(0); ; shift += 7 {
|
||||||
if shift >= 64 {
|
if shift >= 64 {
|
||||||
return ErrIntOverflowApi
|
return ErrIntOverflowNodedebugrpc
|
||||||
}
|
}
|
||||||
if iNdEx >= l {
|
if iNdEx >= l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
@ -979,7 +982,7 @@ func (m *DumpTreeRequest) Unmarshal(dAtA []byte) error {
|
|||||||
var stringLen uint64
|
var stringLen uint64
|
||||||
for shift := uint(0); ; shift += 7 {
|
for shift := uint(0); ; shift += 7 {
|
||||||
if shift >= 64 {
|
if shift >= 64 {
|
||||||
return ErrIntOverflowApi
|
return ErrIntOverflowNodedebugrpc
|
||||||
}
|
}
|
||||||
if iNdEx >= l {
|
if iNdEx >= l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
@ -993,11 +996,11 @@ func (m *DumpTreeRequest) Unmarshal(dAtA []byte) error {
|
|||||||
}
|
}
|
||||||
intStringLen := int(stringLen)
|
intStringLen := int(stringLen)
|
||||||
if intStringLen < 0 {
|
if intStringLen < 0 {
|
||||||
return ErrInvalidLengthApi
|
return ErrInvalidLengthNodedebugrpc
|
||||||
}
|
}
|
||||||
postIndex := iNdEx + intStringLen
|
postIndex := iNdEx + intStringLen
|
||||||
if postIndex < 0 {
|
if postIndex < 0 {
|
||||||
return ErrInvalidLengthApi
|
return ErrInvalidLengthNodedebugrpc
|
||||||
}
|
}
|
||||||
if postIndex > l {
|
if postIndex > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
@ -1011,7 +1014,7 @@ func (m *DumpTreeRequest) Unmarshal(dAtA []byte) error {
|
|||||||
var stringLen uint64
|
var stringLen uint64
|
||||||
for shift := uint(0); ; shift += 7 {
|
for shift := uint(0); ; shift += 7 {
|
||||||
if shift >= 64 {
|
if shift >= 64 {
|
||||||
return ErrIntOverflowApi
|
return ErrIntOverflowNodedebugrpc
|
||||||
}
|
}
|
||||||
if iNdEx >= l {
|
if iNdEx >= l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
@ -1025,11 +1028,11 @@ func (m *DumpTreeRequest) Unmarshal(dAtA []byte) error {
|
|||||||
}
|
}
|
||||||
intStringLen := int(stringLen)
|
intStringLen := int(stringLen)
|
||||||
if intStringLen < 0 {
|
if intStringLen < 0 {
|
||||||
return ErrInvalidLengthApi
|
return ErrInvalidLengthNodedebugrpc
|
||||||
}
|
}
|
||||||
postIndex := iNdEx + intStringLen
|
postIndex := iNdEx + intStringLen
|
||||||
if postIndex < 0 {
|
if postIndex < 0 {
|
||||||
return ErrInvalidLengthApi
|
return ErrInvalidLengthNodedebugrpc
|
||||||
}
|
}
|
||||||
if postIndex > l {
|
if postIndex > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
@ -1038,12 +1041,12 @@ func (m *DumpTreeRequest) Unmarshal(dAtA []byte) error {
|
|||||||
iNdEx = postIndex
|
iNdEx = postIndex
|
||||||
default:
|
default:
|
||||||
iNdEx = preIndex
|
iNdEx = preIndex
|
||||||
skippy, err := skipApi(dAtA[iNdEx:])
|
skippy, err := skipNodedebugrpc(dAtA[iNdEx:])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||||
return ErrInvalidLengthApi
|
return ErrInvalidLengthNodedebugrpc
|
||||||
}
|
}
|
||||||
if (iNdEx + skippy) > l {
|
if (iNdEx + skippy) > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
@ -1065,7 +1068,7 @@ func (m *DumpTreeResponse) Unmarshal(dAtA []byte) error {
|
|||||||
var wire uint64
|
var wire uint64
|
||||||
for shift := uint(0); ; shift += 7 {
|
for shift := uint(0); ; shift += 7 {
|
||||||
if shift >= 64 {
|
if shift >= 64 {
|
||||||
return ErrIntOverflowApi
|
return ErrIntOverflowNodedebugrpc
|
||||||
}
|
}
|
||||||
if iNdEx >= l {
|
if iNdEx >= l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
@ -1093,7 +1096,7 @@ func (m *DumpTreeResponse) Unmarshal(dAtA []byte) error {
|
|||||||
var stringLen uint64
|
var stringLen uint64
|
||||||
for shift := uint(0); ; shift += 7 {
|
for shift := uint(0); ; shift += 7 {
|
||||||
if shift >= 64 {
|
if shift >= 64 {
|
||||||
return ErrIntOverflowApi
|
return ErrIntOverflowNodedebugrpc
|
||||||
}
|
}
|
||||||
if iNdEx >= l {
|
if iNdEx >= l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
@ -1107,11 +1110,11 @@ func (m *DumpTreeResponse) Unmarshal(dAtA []byte) error {
|
|||||||
}
|
}
|
||||||
intStringLen := int(stringLen)
|
intStringLen := int(stringLen)
|
||||||
if intStringLen < 0 {
|
if intStringLen < 0 {
|
||||||
return ErrInvalidLengthApi
|
return ErrInvalidLengthNodedebugrpc
|
||||||
}
|
}
|
||||||
postIndex := iNdEx + intStringLen
|
postIndex := iNdEx + intStringLen
|
||||||
if postIndex < 0 {
|
if postIndex < 0 {
|
||||||
return ErrInvalidLengthApi
|
return ErrInvalidLengthNodedebugrpc
|
||||||
}
|
}
|
||||||
if postIndex > l {
|
if postIndex > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
@ -1120,12 +1123,12 @@ func (m *DumpTreeResponse) Unmarshal(dAtA []byte) error {
|
|||||||
iNdEx = postIndex
|
iNdEx = postIndex
|
||||||
default:
|
default:
|
||||||
iNdEx = preIndex
|
iNdEx = preIndex
|
||||||
skippy, err := skipApi(dAtA[iNdEx:])
|
skippy, err := skipNodedebugrpc(dAtA[iNdEx:])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||||
return ErrInvalidLengthApi
|
return ErrInvalidLengthNodedebugrpc
|
||||||
}
|
}
|
||||||
if (iNdEx + skippy) > l {
|
if (iNdEx + skippy) > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
@ -1147,7 +1150,7 @@ func (m *AllTreesRequest) Unmarshal(dAtA []byte) error {
|
|||||||
var wire uint64
|
var wire uint64
|
||||||
for shift := uint(0); ; shift += 7 {
|
for shift := uint(0); ; shift += 7 {
|
||||||
if shift >= 64 {
|
if shift >= 64 {
|
||||||
return ErrIntOverflowApi
|
return ErrIntOverflowNodedebugrpc
|
||||||
}
|
}
|
||||||
if iNdEx >= l {
|
if iNdEx >= l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
@ -1175,7 +1178,7 @@ func (m *AllTreesRequest) Unmarshal(dAtA []byte) error {
|
|||||||
var stringLen uint64
|
var stringLen uint64
|
||||||
for shift := uint(0); ; shift += 7 {
|
for shift := uint(0); ; shift += 7 {
|
||||||
if shift >= 64 {
|
if shift >= 64 {
|
||||||
return ErrIntOverflowApi
|
return ErrIntOverflowNodedebugrpc
|
||||||
}
|
}
|
||||||
if iNdEx >= l {
|
if iNdEx >= l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
@ -1189,11 +1192,11 @@ func (m *AllTreesRequest) Unmarshal(dAtA []byte) error {
|
|||||||
}
|
}
|
||||||
intStringLen := int(stringLen)
|
intStringLen := int(stringLen)
|
||||||
if intStringLen < 0 {
|
if intStringLen < 0 {
|
||||||
return ErrInvalidLengthApi
|
return ErrInvalidLengthNodedebugrpc
|
||||||
}
|
}
|
||||||
postIndex := iNdEx + intStringLen
|
postIndex := iNdEx + intStringLen
|
||||||
if postIndex < 0 {
|
if postIndex < 0 {
|
||||||
return ErrInvalidLengthApi
|
return ErrInvalidLengthNodedebugrpc
|
||||||
}
|
}
|
||||||
if postIndex > l {
|
if postIndex > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
@ -1202,12 +1205,12 @@ func (m *AllTreesRequest) Unmarshal(dAtA []byte) error {
|
|||||||
iNdEx = postIndex
|
iNdEx = postIndex
|
||||||
default:
|
default:
|
||||||
iNdEx = preIndex
|
iNdEx = preIndex
|
||||||
skippy, err := skipApi(dAtA[iNdEx:])
|
skippy, err := skipNodedebugrpc(dAtA[iNdEx:])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||||
return ErrInvalidLengthApi
|
return ErrInvalidLengthNodedebugrpc
|
||||||
}
|
}
|
||||||
if (iNdEx + skippy) > l {
|
if (iNdEx + skippy) > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
@ -1229,7 +1232,7 @@ func (m *Tree) Unmarshal(dAtA []byte) error {
|
|||||||
var wire uint64
|
var wire uint64
|
||||||
for shift := uint(0); ; shift += 7 {
|
for shift := uint(0); ; shift += 7 {
|
||||||
if shift >= 64 {
|
if shift >= 64 {
|
||||||
return ErrIntOverflowApi
|
return ErrIntOverflowNodedebugrpc
|
||||||
}
|
}
|
||||||
if iNdEx >= l {
|
if iNdEx >= l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
@ -1257,7 +1260,7 @@ func (m *Tree) Unmarshal(dAtA []byte) error {
|
|||||||
var stringLen uint64
|
var stringLen uint64
|
||||||
for shift := uint(0); ; shift += 7 {
|
for shift := uint(0); ; shift += 7 {
|
||||||
if shift >= 64 {
|
if shift >= 64 {
|
||||||
return ErrIntOverflowApi
|
return ErrIntOverflowNodedebugrpc
|
||||||
}
|
}
|
||||||
if iNdEx >= l {
|
if iNdEx >= l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
@ -1271,11 +1274,11 @@ func (m *Tree) Unmarshal(dAtA []byte) error {
|
|||||||
}
|
}
|
||||||
intStringLen := int(stringLen)
|
intStringLen := int(stringLen)
|
||||||
if intStringLen < 0 {
|
if intStringLen < 0 {
|
||||||
return ErrInvalidLengthApi
|
return ErrInvalidLengthNodedebugrpc
|
||||||
}
|
}
|
||||||
postIndex := iNdEx + intStringLen
|
postIndex := iNdEx + intStringLen
|
||||||
if postIndex < 0 {
|
if postIndex < 0 {
|
||||||
return ErrInvalidLengthApi
|
return ErrInvalidLengthNodedebugrpc
|
||||||
}
|
}
|
||||||
if postIndex > l {
|
if postIndex > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
@ -1289,7 +1292,7 @@ func (m *Tree) Unmarshal(dAtA []byte) error {
|
|||||||
var stringLen uint64
|
var stringLen uint64
|
||||||
for shift := uint(0); ; shift += 7 {
|
for shift := uint(0); ; shift += 7 {
|
||||||
if shift >= 64 {
|
if shift >= 64 {
|
||||||
return ErrIntOverflowApi
|
return ErrIntOverflowNodedebugrpc
|
||||||
}
|
}
|
||||||
if iNdEx >= l {
|
if iNdEx >= l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
@ -1303,11 +1306,11 @@ func (m *Tree) Unmarshal(dAtA []byte) error {
|
|||||||
}
|
}
|
||||||
intStringLen := int(stringLen)
|
intStringLen := int(stringLen)
|
||||||
if intStringLen < 0 {
|
if intStringLen < 0 {
|
||||||
return ErrInvalidLengthApi
|
return ErrInvalidLengthNodedebugrpc
|
||||||
}
|
}
|
||||||
postIndex := iNdEx + intStringLen
|
postIndex := iNdEx + intStringLen
|
||||||
if postIndex < 0 {
|
if postIndex < 0 {
|
||||||
return ErrInvalidLengthApi
|
return ErrInvalidLengthNodedebugrpc
|
||||||
}
|
}
|
||||||
if postIndex > l {
|
if postIndex > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
@ -1316,12 +1319,12 @@ func (m *Tree) Unmarshal(dAtA []byte) error {
|
|||||||
iNdEx = postIndex
|
iNdEx = postIndex
|
||||||
default:
|
default:
|
||||||
iNdEx = preIndex
|
iNdEx = preIndex
|
||||||
skippy, err := skipApi(dAtA[iNdEx:])
|
skippy, err := skipNodedebugrpc(dAtA[iNdEx:])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||||
return ErrInvalidLengthApi
|
return ErrInvalidLengthNodedebugrpc
|
||||||
}
|
}
|
||||||
if (iNdEx + skippy) > l {
|
if (iNdEx + skippy) > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
@ -1343,7 +1346,7 @@ func (m *AllTreesResponse) Unmarshal(dAtA []byte) error {
|
|||||||
var wire uint64
|
var wire uint64
|
||||||
for shift := uint(0); ; shift += 7 {
|
for shift := uint(0); ; shift += 7 {
|
||||||
if shift >= 64 {
|
if shift >= 64 {
|
||||||
return ErrIntOverflowApi
|
return ErrIntOverflowNodedebugrpc
|
||||||
}
|
}
|
||||||
if iNdEx >= l {
|
if iNdEx >= l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
@ -1371,7 +1374,7 @@ func (m *AllTreesResponse) Unmarshal(dAtA []byte) error {
|
|||||||
var msglen int
|
var msglen int
|
||||||
for shift := uint(0); ; shift += 7 {
|
for shift := uint(0); ; shift += 7 {
|
||||||
if shift >= 64 {
|
if shift >= 64 {
|
||||||
return ErrIntOverflowApi
|
return ErrIntOverflowNodedebugrpc
|
||||||
}
|
}
|
||||||
if iNdEx >= l {
|
if iNdEx >= l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
@ -1384,11 +1387,11 @@ func (m *AllTreesResponse) Unmarshal(dAtA []byte) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if msglen < 0 {
|
if msglen < 0 {
|
||||||
return ErrInvalidLengthApi
|
return ErrInvalidLengthNodedebugrpc
|
||||||
}
|
}
|
||||||
postIndex := iNdEx + msglen
|
postIndex := iNdEx + msglen
|
||||||
if postIndex < 0 {
|
if postIndex < 0 {
|
||||||
return ErrInvalidLengthApi
|
return ErrInvalidLengthNodedebugrpc
|
||||||
}
|
}
|
||||||
if postIndex > l {
|
if postIndex > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
@ -1400,12 +1403,12 @@ func (m *AllTreesResponse) Unmarshal(dAtA []byte) error {
|
|||||||
iNdEx = postIndex
|
iNdEx = postIndex
|
||||||
default:
|
default:
|
||||||
iNdEx = preIndex
|
iNdEx = preIndex
|
||||||
skippy, err := skipApi(dAtA[iNdEx:])
|
skippy, err := skipNodedebugrpc(dAtA[iNdEx:])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||||
return ErrInvalidLengthApi
|
return ErrInvalidLengthNodedebugrpc
|
||||||
}
|
}
|
||||||
if (iNdEx + skippy) > l {
|
if (iNdEx + skippy) > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
@ -1427,7 +1430,7 @@ func (m *AllSpacesRequest) Unmarshal(dAtA []byte) error {
|
|||||||
var wire uint64
|
var wire uint64
|
||||||
for shift := uint(0); ; shift += 7 {
|
for shift := uint(0); ; shift += 7 {
|
||||||
if shift >= 64 {
|
if shift >= 64 {
|
||||||
return ErrIntOverflowApi
|
return ErrIntOverflowNodedebugrpc
|
||||||
}
|
}
|
||||||
if iNdEx >= l {
|
if iNdEx >= l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
@ -1450,12 +1453,12 @@ func (m *AllSpacesRequest) Unmarshal(dAtA []byte) error {
|
|||||||
switch fieldNum {
|
switch fieldNum {
|
||||||
default:
|
default:
|
||||||
iNdEx = preIndex
|
iNdEx = preIndex
|
||||||
skippy, err := skipApi(dAtA[iNdEx:])
|
skippy, err := skipNodedebugrpc(dAtA[iNdEx:])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||||
return ErrInvalidLengthApi
|
return ErrInvalidLengthNodedebugrpc
|
||||||
}
|
}
|
||||||
if (iNdEx + skippy) > l {
|
if (iNdEx + skippy) > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
@ -1477,7 +1480,7 @@ func (m *AllSpacesResponse) Unmarshal(dAtA []byte) error {
|
|||||||
var wire uint64
|
var wire uint64
|
||||||
for shift := uint(0); ; shift += 7 {
|
for shift := uint(0); ; shift += 7 {
|
||||||
if shift >= 64 {
|
if shift >= 64 {
|
||||||
return ErrIntOverflowApi
|
return ErrIntOverflowNodedebugrpc
|
||||||
}
|
}
|
||||||
if iNdEx >= l {
|
if iNdEx >= l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
@ -1505,7 +1508,7 @@ func (m *AllSpacesResponse) Unmarshal(dAtA []byte) error {
|
|||||||
var stringLen uint64
|
var stringLen uint64
|
||||||
for shift := uint(0); ; shift += 7 {
|
for shift := uint(0); ; shift += 7 {
|
||||||
if shift >= 64 {
|
if shift >= 64 {
|
||||||
return ErrIntOverflowApi
|
return ErrIntOverflowNodedebugrpc
|
||||||
}
|
}
|
||||||
if iNdEx >= l {
|
if iNdEx >= l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
@ -1519,11 +1522,11 @@ func (m *AllSpacesResponse) Unmarshal(dAtA []byte) error {
|
|||||||
}
|
}
|
||||||
intStringLen := int(stringLen)
|
intStringLen := int(stringLen)
|
||||||
if intStringLen < 0 {
|
if intStringLen < 0 {
|
||||||
return ErrInvalidLengthApi
|
return ErrInvalidLengthNodedebugrpc
|
||||||
}
|
}
|
||||||
postIndex := iNdEx + intStringLen
|
postIndex := iNdEx + intStringLen
|
||||||
if postIndex < 0 {
|
if postIndex < 0 {
|
||||||
return ErrInvalidLengthApi
|
return ErrInvalidLengthNodedebugrpc
|
||||||
}
|
}
|
||||||
if postIndex > l {
|
if postIndex > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
@ -1532,12 +1535,12 @@ func (m *AllSpacesResponse) Unmarshal(dAtA []byte) error {
|
|||||||
iNdEx = postIndex
|
iNdEx = postIndex
|
||||||
default:
|
default:
|
||||||
iNdEx = preIndex
|
iNdEx = preIndex
|
||||||
skippy, err := skipApi(dAtA[iNdEx:])
|
skippy, err := skipNodedebugrpc(dAtA[iNdEx:])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||||
return ErrInvalidLengthApi
|
return ErrInvalidLengthNodedebugrpc
|
||||||
}
|
}
|
||||||
if (iNdEx + skippy) > l {
|
if (iNdEx + skippy) > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
@ -1559,7 +1562,7 @@ func (m *TreeParamsRequest) Unmarshal(dAtA []byte) error {
|
|||||||
var wire uint64
|
var wire uint64
|
||||||
for shift := uint(0); ; shift += 7 {
|
for shift := uint(0); ; shift += 7 {
|
||||||
if shift >= 64 {
|
if shift >= 64 {
|
||||||
return ErrIntOverflowApi
|
return ErrIntOverflowNodedebugrpc
|
||||||
}
|
}
|
||||||
if iNdEx >= l {
|
if iNdEx >= l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
@ -1587,7 +1590,7 @@ func (m *TreeParamsRequest) Unmarshal(dAtA []byte) error {
|
|||||||
var stringLen uint64
|
var stringLen uint64
|
||||||
for shift := uint(0); ; shift += 7 {
|
for shift := uint(0); ; shift += 7 {
|
||||||
if shift >= 64 {
|
if shift >= 64 {
|
||||||
return ErrIntOverflowApi
|
return ErrIntOverflowNodedebugrpc
|
||||||
}
|
}
|
||||||
if iNdEx >= l {
|
if iNdEx >= l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
@ -1601,11 +1604,11 @@ func (m *TreeParamsRequest) Unmarshal(dAtA []byte) error {
|
|||||||
}
|
}
|
||||||
intStringLen := int(stringLen)
|
intStringLen := int(stringLen)
|
||||||
if intStringLen < 0 {
|
if intStringLen < 0 {
|
||||||
return ErrInvalidLengthApi
|
return ErrInvalidLengthNodedebugrpc
|
||||||
}
|
}
|
||||||
postIndex := iNdEx + intStringLen
|
postIndex := iNdEx + intStringLen
|
||||||
if postIndex < 0 {
|
if postIndex < 0 {
|
||||||
return ErrInvalidLengthApi
|
return ErrInvalidLengthNodedebugrpc
|
||||||
}
|
}
|
||||||
if postIndex > l {
|
if postIndex > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
@ -1619,7 +1622,7 @@ func (m *TreeParamsRequest) Unmarshal(dAtA []byte) error {
|
|||||||
var stringLen uint64
|
var stringLen uint64
|
||||||
for shift := uint(0); ; shift += 7 {
|
for shift := uint(0); ; shift += 7 {
|
||||||
if shift >= 64 {
|
if shift >= 64 {
|
||||||
return ErrIntOverflowApi
|
return ErrIntOverflowNodedebugrpc
|
||||||
}
|
}
|
||||||
if iNdEx >= l {
|
if iNdEx >= l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
@ -1633,11 +1636,11 @@ func (m *TreeParamsRequest) Unmarshal(dAtA []byte) error {
|
|||||||
}
|
}
|
||||||
intStringLen := int(stringLen)
|
intStringLen := int(stringLen)
|
||||||
if intStringLen < 0 {
|
if intStringLen < 0 {
|
||||||
return ErrInvalidLengthApi
|
return ErrInvalidLengthNodedebugrpc
|
||||||
}
|
}
|
||||||
postIndex := iNdEx + intStringLen
|
postIndex := iNdEx + intStringLen
|
||||||
if postIndex < 0 {
|
if postIndex < 0 {
|
||||||
return ErrInvalidLengthApi
|
return ErrInvalidLengthNodedebugrpc
|
||||||
}
|
}
|
||||||
if postIndex > l {
|
if postIndex > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
@ -1646,12 +1649,12 @@ func (m *TreeParamsRequest) Unmarshal(dAtA []byte) error {
|
|||||||
iNdEx = postIndex
|
iNdEx = postIndex
|
||||||
default:
|
default:
|
||||||
iNdEx = preIndex
|
iNdEx = preIndex
|
||||||
skippy, err := skipApi(dAtA[iNdEx:])
|
skippy, err := skipNodedebugrpc(dAtA[iNdEx:])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||||
return ErrInvalidLengthApi
|
return ErrInvalidLengthNodedebugrpc
|
||||||
}
|
}
|
||||||
if (iNdEx + skippy) > l {
|
if (iNdEx + skippy) > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
@ -1673,7 +1676,7 @@ func (m *TreeParamsResponse) Unmarshal(dAtA []byte) error {
|
|||||||
var wire uint64
|
var wire uint64
|
||||||
for shift := uint(0); ; shift += 7 {
|
for shift := uint(0); ; shift += 7 {
|
||||||
if shift >= 64 {
|
if shift >= 64 {
|
||||||
return ErrIntOverflowApi
|
return ErrIntOverflowNodedebugrpc
|
||||||
}
|
}
|
||||||
if iNdEx >= l {
|
if iNdEx >= l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
@ -1701,7 +1704,7 @@ func (m *TreeParamsResponse) Unmarshal(dAtA []byte) error {
|
|||||||
var stringLen uint64
|
var stringLen uint64
|
||||||
for shift := uint(0); ; shift += 7 {
|
for shift := uint(0); ; shift += 7 {
|
||||||
if shift >= 64 {
|
if shift >= 64 {
|
||||||
return ErrIntOverflowApi
|
return ErrIntOverflowNodedebugrpc
|
||||||
}
|
}
|
||||||
if iNdEx >= l {
|
if iNdEx >= l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
@ -1715,11 +1718,11 @@ func (m *TreeParamsResponse) Unmarshal(dAtA []byte) error {
|
|||||||
}
|
}
|
||||||
intStringLen := int(stringLen)
|
intStringLen := int(stringLen)
|
||||||
if intStringLen < 0 {
|
if intStringLen < 0 {
|
||||||
return ErrInvalidLengthApi
|
return ErrInvalidLengthNodedebugrpc
|
||||||
}
|
}
|
||||||
postIndex := iNdEx + intStringLen
|
postIndex := iNdEx + intStringLen
|
||||||
if postIndex < 0 {
|
if postIndex < 0 {
|
||||||
return ErrInvalidLengthApi
|
return ErrInvalidLengthNodedebugrpc
|
||||||
}
|
}
|
||||||
if postIndex > l {
|
if postIndex > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
@ -1733,7 +1736,7 @@ func (m *TreeParamsResponse) Unmarshal(dAtA []byte) error {
|
|||||||
var stringLen uint64
|
var stringLen uint64
|
||||||
for shift := uint(0); ; shift += 7 {
|
for shift := uint(0); ; shift += 7 {
|
||||||
if shift >= 64 {
|
if shift >= 64 {
|
||||||
return ErrIntOverflowApi
|
return ErrIntOverflowNodedebugrpc
|
||||||
}
|
}
|
||||||
if iNdEx >= l {
|
if iNdEx >= l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
@ -1747,11 +1750,11 @@ func (m *TreeParamsResponse) Unmarshal(dAtA []byte) error {
|
|||||||
}
|
}
|
||||||
intStringLen := int(stringLen)
|
intStringLen := int(stringLen)
|
||||||
if intStringLen < 0 {
|
if intStringLen < 0 {
|
||||||
return ErrInvalidLengthApi
|
return ErrInvalidLengthNodedebugrpc
|
||||||
}
|
}
|
||||||
postIndex := iNdEx + intStringLen
|
postIndex := iNdEx + intStringLen
|
||||||
if postIndex < 0 {
|
if postIndex < 0 {
|
||||||
return ErrInvalidLengthApi
|
return ErrInvalidLengthNodedebugrpc
|
||||||
}
|
}
|
||||||
if postIndex > l {
|
if postIndex > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
@ -1760,12 +1763,12 @@ func (m *TreeParamsResponse) Unmarshal(dAtA []byte) error {
|
|||||||
iNdEx = postIndex
|
iNdEx = postIndex
|
||||||
default:
|
default:
|
||||||
iNdEx = preIndex
|
iNdEx = preIndex
|
||||||
skippy, err := skipApi(dAtA[iNdEx:])
|
skippy, err := skipNodedebugrpc(dAtA[iNdEx:])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||||
return ErrInvalidLengthApi
|
return ErrInvalidLengthNodedebugrpc
|
||||||
}
|
}
|
||||||
if (iNdEx + skippy) > l {
|
if (iNdEx + skippy) > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
@ -1779,7 +1782,7 @@ func (m *TreeParamsResponse) Unmarshal(dAtA []byte) error {
|
|||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
func skipApi(dAtA []byte) (n int, err error) {
|
func skipNodedebugrpc(dAtA []byte) (n int, err error) {
|
||||||
l := len(dAtA)
|
l := len(dAtA)
|
||||||
iNdEx := 0
|
iNdEx := 0
|
||||||
depth := 0
|
depth := 0
|
||||||
@ -1787,7 +1790,7 @@ func skipApi(dAtA []byte) (n int, err error) {
|
|||||||
var wire uint64
|
var wire uint64
|
||||||
for shift := uint(0); ; shift += 7 {
|
for shift := uint(0); ; shift += 7 {
|
||||||
if shift >= 64 {
|
if shift >= 64 {
|
||||||
return 0, ErrIntOverflowApi
|
return 0, ErrIntOverflowNodedebugrpc
|
||||||
}
|
}
|
||||||
if iNdEx >= l {
|
if iNdEx >= l {
|
||||||
return 0, io.ErrUnexpectedEOF
|
return 0, io.ErrUnexpectedEOF
|
||||||
@ -1804,7 +1807,7 @@ func skipApi(dAtA []byte) (n int, err error) {
|
|||||||
case 0:
|
case 0:
|
||||||
for shift := uint(0); ; shift += 7 {
|
for shift := uint(0); ; shift += 7 {
|
||||||
if shift >= 64 {
|
if shift >= 64 {
|
||||||
return 0, ErrIntOverflowApi
|
return 0, ErrIntOverflowNodedebugrpc
|
||||||
}
|
}
|
||||||
if iNdEx >= l {
|
if iNdEx >= l {
|
||||||
return 0, io.ErrUnexpectedEOF
|
return 0, io.ErrUnexpectedEOF
|
||||||
@ -1820,7 +1823,7 @@ func skipApi(dAtA []byte) (n int, err error) {
|
|||||||
var length int
|
var length int
|
||||||
for shift := uint(0); ; shift += 7 {
|
for shift := uint(0); ; shift += 7 {
|
||||||
if shift >= 64 {
|
if shift >= 64 {
|
||||||
return 0, ErrIntOverflowApi
|
return 0, ErrIntOverflowNodedebugrpc
|
||||||
}
|
}
|
||||||
if iNdEx >= l {
|
if iNdEx >= l {
|
||||||
return 0, io.ErrUnexpectedEOF
|
return 0, io.ErrUnexpectedEOF
|
||||||
@ -1833,14 +1836,14 @@ func skipApi(dAtA []byte) (n int, err error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if length < 0 {
|
if length < 0 {
|
||||||
return 0, ErrInvalidLengthApi
|
return 0, ErrInvalidLengthNodedebugrpc
|
||||||
}
|
}
|
||||||
iNdEx += length
|
iNdEx += length
|
||||||
case 3:
|
case 3:
|
||||||
depth++
|
depth++
|
||||||
case 4:
|
case 4:
|
||||||
if depth == 0 {
|
if depth == 0 {
|
||||||
return 0, ErrUnexpectedEndOfGroupApi
|
return 0, ErrUnexpectedEndOfGroupNodedebugrpc
|
||||||
}
|
}
|
||||||
depth--
|
depth--
|
||||||
case 5:
|
case 5:
|
||||||
@ -1849,7 +1852,7 @@ func skipApi(dAtA []byte) (n int, err error) {
|
|||||||
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
||||||
}
|
}
|
||||||
if iNdEx < 0 {
|
if iNdEx < 0 {
|
||||||
return 0, ErrInvalidLengthApi
|
return 0, ErrInvalidLengthNodedebugrpc
|
||||||
}
|
}
|
||||||
if depth == 0 {
|
if depth == 0 {
|
||||||
return iNdEx, nil
|
return iNdEx, nil
|
||||||
@ -1859,7 +1862,7 @@ func skipApi(dAtA []byte) (n int, err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
ErrInvalidLengthApi = fmt.Errorf("proto: negative length found during unmarshaling")
|
ErrInvalidLengthNodedebugrpc = fmt.Errorf("proto: negative length found during unmarshaling")
|
||||||
ErrIntOverflowApi = fmt.Errorf("proto: integer overflow")
|
ErrIntOverflowNodedebugrpc = fmt.Errorf("proto: integer overflow")
|
||||||
ErrUnexpectedEndOfGroupApi = fmt.Errorf("proto: unexpected end of group")
|
ErrUnexpectedEndOfGroupNodedebugrpc = fmt.Errorf("proto: unexpected end of group")
|
||||||
)
|
)
|
||||||
@ -1,6 +1,6 @@
|
|||||||
// Code generated by protoc-gen-go-drpc. DO NOT EDIT.
|
// Code generated by protoc-gen-go-drpc. DO NOT EDIT.
|
||||||
// protoc-gen-go-drpc version: v0.0.32
|
// protoc-gen-go-drpc version: v0.0.32
|
||||||
// source: api/apiproto/protos/api.proto
|
// source: debug/nodedebugrpc/nodedebugrpcproto/protos/nodedebugrpc.proto
|
||||||
|
|
||||||
package nodedebugrpcproto
|
package nodedebugrpcproto
|
||||||
|
|
||||||
@ -14,17 +14,17 @@ import (
|
|||||||
drpcerr "storj.io/drpc/drpcerr"
|
drpcerr "storj.io/drpc/drpcerr"
|
||||||
)
|
)
|
||||||
|
|
||||||
type drpcEncoding_File_api_apiproto_protos_api_proto struct{}
|
type drpcEncoding_File_debug_nodedebugrpc_nodedebugrpcproto_protos_nodedebugrpc_proto struct{}
|
||||||
|
|
||||||
func (drpcEncoding_File_api_apiproto_protos_api_proto) Marshal(msg drpc.Message) ([]byte, error) {
|
func (drpcEncoding_File_debug_nodedebugrpc_nodedebugrpcproto_protos_nodedebugrpc_proto) Marshal(msg drpc.Message) ([]byte, error) {
|
||||||
return proto.Marshal(msg.(proto.Message))
|
return proto.Marshal(msg.(proto.Message))
|
||||||
}
|
}
|
||||||
|
|
||||||
func (drpcEncoding_File_api_apiproto_protos_api_proto) Unmarshal(buf []byte, msg drpc.Message) error {
|
func (drpcEncoding_File_debug_nodedebugrpc_nodedebugrpcproto_protos_nodedebugrpc_proto) Unmarshal(buf []byte, msg drpc.Message) error {
|
||||||
return proto.Unmarshal(buf, msg.(proto.Message))
|
return proto.Unmarshal(buf, msg.(proto.Message))
|
||||||
}
|
}
|
||||||
|
|
||||||
func (drpcEncoding_File_api_apiproto_protos_api_proto) JSONMarshal(msg drpc.Message) ([]byte, error) {
|
func (drpcEncoding_File_debug_nodedebugrpc_nodedebugrpcproto_protos_nodedebugrpc_proto) JSONMarshal(msg drpc.Message) ([]byte, error) {
|
||||||
var buf bytes.Buffer
|
var buf bytes.Buffer
|
||||||
err := new(jsonpb.Marshaler).Marshal(&buf, msg.(proto.Message))
|
err := new(jsonpb.Marshaler).Marshal(&buf, msg.(proto.Message))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -33,7 +33,7 @@ func (drpcEncoding_File_api_apiproto_protos_api_proto) JSONMarshal(msg drpc.Mess
|
|||||||
return buf.Bytes(), nil
|
return buf.Bytes(), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (drpcEncoding_File_api_apiproto_protos_api_proto) JSONUnmarshal(buf []byte, msg drpc.Message) error {
|
func (drpcEncoding_File_debug_nodedebugrpc_nodedebugrpcproto_protos_nodedebugrpc_proto) JSONUnmarshal(buf []byte, msg drpc.Message) error {
|
||||||
return jsonpb.Unmarshal(bytes.NewReader(buf), msg.(proto.Message))
|
return jsonpb.Unmarshal(bytes.NewReader(buf), msg.(proto.Message))
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -58,7 +58,7 @@ func (c *drpcNodeApiClient) DRPCConn() drpc.Conn { return c.cc }
|
|||||||
|
|
||||||
func (c *drpcNodeApiClient) DumpTree(ctx context.Context, in *DumpTreeRequest) (*DumpTreeResponse, error) {
|
func (c *drpcNodeApiClient) DumpTree(ctx context.Context, in *DumpTreeRequest) (*DumpTreeResponse, error) {
|
||||||
out := new(DumpTreeResponse)
|
out := new(DumpTreeResponse)
|
||||||
err := c.cc.Invoke(ctx, "/nodeapi.NodeApi/DumpTree", drpcEncoding_File_api_apiproto_protos_api_proto{}, in, out)
|
err := c.cc.Invoke(ctx, "/nodeapi.NodeApi/DumpTree", drpcEncoding_File_debug_nodedebugrpc_nodedebugrpcproto_protos_nodedebugrpc_proto{}, in, out)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@ -67,7 +67,7 @@ func (c *drpcNodeApiClient) DumpTree(ctx context.Context, in *DumpTreeRequest) (
|
|||||||
|
|
||||||
func (c *drpcNodeApiClient) TreeParams(ctx context.Context, in *TreeParamsRequest) (*TreeParamsResponse, error) {
|
func (c *drpcNodeApiClient) TreeParams(ctx context.Context, in *TreeParamsRequest) (*TreeParamsResponse, error) {
|
||||||
out := new(TreeParamsResponse)
|
out := new(TreeParamsResponse)
|
||||||
err := c.cc.Invoke(ctx, "/nodeapi.NodeApi/TreeParams", drpcEncoding_File_api_apiproto_protos_api_proto{}, in, out)
|
err := c.cc.Invoke(ctx, "/nodeapi.NodeApi/TreeParams", drpcEncoding_File_debug_nodedebugrpc_nodedebugrpcproto_protos_nodedebugrpc_proto{}, in, out)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@ -76,7 +76,7 @@ func (c *drpcNodeApiClient) TreeParams(ctx context.Context, in *TreeParamsReques
|
|||||||
|
|
||||||
func (c *drpcNodeApiClient) AllTrees(ctx context.Context, in *AllTreesRequest) (*AllTreesResponse, error) {
|
func (c *drpcNodeApiClient) AllTrees(ctx context.Context, in *AllTreesRequest) (*AllTreesResponse, error) {
|
||||||
out := new(AllTreesResponse)
|
out := new(AllTreesResponse)
|
||||||
err := c.cc.Invoke(ctx, "/nodeapi.NodeApi/AllTrees", drpcEncoding_File_api_apiproto_protos_api_proto{}, in, out)
|
err := c.cc.Invoke(ctx, "/nodeapi.NodeApi/AllTrees", drpcEncoding_File_debug_nodedebugrpc_nodedebugrpcproto_protos_nodedebugrpc_proto{}, in, out)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@ -85,7 +85,7 @@ func (c *drpcNodeApiClient) AllTrees(ctx context.Context, in *AllTreesRequest) (
|
|||||||
|
|
||||||
func (c *drpcNodeApiClient) AllSpaces(ctx context.Context, in *AllSpacesRequest) (*AllSpacesResponse, error) {
|
func (c *drpcNodeApiClient) AllSpaces(ctx context.Context, in *AllSpacesRequest) (*AllSpacesResponse, error) {
|
||||||
out := new(AllSpacesResponse)
|
out := new(AllSpacesResponse)
|
||||||
err := c.cc.Invoke(ctx, "/nodeapi.NodeApi/AllSpaces", drpcEncoding_File_api_apiproto_protos_api_proto{}, in, out)
|
err := c.cc.Invoke(ctx, "/nodeapi.NodeApi/AllSpaces", drpcEncoding_File_debug_nodedebugrpc_nodedebugrpcproto_protos_nodedebugrpc_proto{}, in, out)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@ -124,7 +124,7 @@ func (DRPCNodeApiDescription) NumMethods() int { return 4 }
|
|||||||
func (DRPCNodeApiDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, interface{}, bool) {
|
func (DRPCNodeApiDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, interface{}, bool) {
|
||||||
switch n {
|
switch n {
|
||||||
case 0:
|
case 0:
|
||||||
return "/nodeapi.NodeApi/DumpTree", drpcEncoding_File_api_apiproto_protos_api_proto{},
|
return "/nodeapi.NodeApi/DumpTree", drpcEncoding_File_debug_nodedebugrpc_nodedebugrpcproto_protos_nodedebugrpc_proto{},
|
||||||
func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) {
|
func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) {
|
||||||
return srv.(DRPCNodeApiServer).
|
return srv.(DRPCNodeApiServer).
|
||||||
DumpTree(
|
DumpTree(
|
||||||
@ -133,7 +133,7 @@ func (DRPCNodeApiDescription) Method(n int) (string, drpc.Encoding, drpc.Receive
|
|||||||
)
|
)
|
||||||
}, DRPCNodeApiServer.DumpTree, true
|
}, DRPCNodeApiServer.DumpTree, true
|
||||||
case 1:
|
case 1:
|
||||||
return "/nodeapi.NodeApi/TreeParams", drpcEncoding_File_api_apiproto_protos_api_proto{},
|
return "/nodeapi.NodeApi/TreeParams", drpcEncoding_File_debug_nodedebugrpc_nodedebugrpcproto_protos_nodedebugrpc_proto{},
|
||||||
func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) {
|
func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) {
|
||||||
return srv.(DRPCNodeApiServer).
|
return srv.(DRPCNodeApiServer).
|
||||||
TreeParams(
|
TreeParams(
|
||||||
@ -142,7 +142,7 @@ func (DRPCNodeApiDescription) Method(n int) (string, drpc.Encoding, drpc.Receive
|
|||||||
)
|
)
|
||||||
}, DRPCNodeApiServer.TreeParams, true
|
}, DRPCNodeApiServer.TreeParams, true
|
||||||
case 2:
|
case 2:
|
||||||
return "/nodeapi.NodeApi/AllTrees", drpcEncoding_File_api_apiproto_protos_api_proto{},
|
return "/nodeapi.NodeApi/AllTrees", drpcEncoding_File_debug_nodedebugrpc_nodedebugrpcproto_protos_nodedebugrpc_proto{},
|
||||||
func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) {
|
func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) {
|
||||||
return srv.(DRPCNodeApiServer).
|
return srv.(DRPCNodeApiServer).
|
||||||
AllTrees(
|
AllTrees(
|
||||||
@ -151,7 +151,7 @@ func (DRPCNodeApiDescription) Method(n int) (string, drpc.Encoding, drpc.Receive
|
|||||||
)
|
)
|
||||||
}, DRPCNodeApiServer.AllTrees, true
|
}, DRPCNodeApiServer.AllTrees, true
|
||||||
case 3:
|
case 3:
|
||||||
return "/nodeapi.NodeApi/AllSpaces", drpcEncoding_File_api_apiproto_protos_api_proto{},
|
return "/nodeapi.NodeApi/AllSpaces", drpcEncoding_File_debug_nodedebugrpc_nodedebugrpcproto_protos_nodedebugrpc_proto{},
|
||||||
func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) {
|
func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) {
|
||||||
return srv.(DRPCNodeApiServer).
|
return srv.(DRPCNodeApiServer).
|
||||||
AllSpaces(
|
AllSpaces(
|
||||||
@ -178,7 +178,7 @@ type drpcNodeApi_DumpTreeStream struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (x *drpcNodeApi_DumpTreeStream) SendAndClose(m *DumpTreeResponse) error {
|
func (x *drpcNodeApi_DumpTreeStream) SendAndClose(m *DumpTreeResponse) error {
|
||||||
if err := x.MsgSend(m, drpcEncoding_File_api_apiproto_protos_api_proto{}); err != nil {
|
if err := x.MsgSend(m, drpcEncoding_File_debug_nodedebugrpc_nodedebugrpcproto_protos_nodedebugrpc_proto{}); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
return x.CloseSend()
|
return x.CloseSend()
|
||||||
@ -194,7 +194,7 @@ type drpcNodeApi_TreeParamsStream struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (x *drpcNodeApi_TreeParamsStream) SendAndClose(m *TreeParamsResponse) error {
|
func (x *drpcNodeApi_TreeParamsStream) SendAndClose(m *TreeParamsResponse) error {
|
||||||
if err := x.MsgSend(m, drpcEncoding_File_api_apiproto_protos_api_proto{}); err != nil {
|
if err := x.MsgSend(m, drpcEncoding_File_debug_nodedebugrpc_nodedebugrpcproto_protos_nodedebugrpc_proto{}); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
return x.CloseSend()
|
return x.CloseSend()
|
||||||
@ -210,7 +210,7 @@ type drpcNodeApi_AllTreesStream struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (x *drpcNodeApi_AllTreesStream) SendAndClose(m *AllTreesResponse) error {
|
func (x *drpcNodeApi_AllTreesStream) SendAndClose(m *AllTreesResponse) error {
|
||||||
if err := x.MsgSend(m, drpcEncoding_File_api_apiproto_protos_api_proto{}); err != nil {
|
if err := x.MsgSend(m, drpcEncoding_File_debug_nodedebugrpc_nodedebugrpcproto_protos_nodedebugrpc_proto{}); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
return x.CloseSend()
|
return x.CloseSend()
|
||||||
@ -226,7 +226,7 @@ type drpcNodeApi_AllSpacesStream struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (x *drpcNodeApi_AllSpacesStream) SendAndClose(m *AllSpacesResponse) error {
|
func (x *drpcNodeApi_AllSpacesStream) SendAndClose(m *AllSpacesResponse) error {
|
||||||
if err := x.MsgSend(m, drpcEncoding_File_api_apiproto_protos_api_proto{}); err != nil {
|
if err := x.MsgSend(m, drpcEncoding_File_debug_nodedebugrpc_nodedebugrpcproto_protos_nodedebugrpc_proto{}); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
return x.CloseSend()
|
return x.CloseSend()
|
||||||
@ -1,7 +1,7 @@
|
|||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
package nodeapi;
|
package nodeapi;
|
||||||
|
|
||||||
option go_package = "api/apiproto";
|
option go_package = "debug/nodedebugrpc/nodedebugrpcproto";
|
||||||
|
|
||||||
service NodeApi {
|
service NodeApi {
|
||||||
rpc DumpTree(DumpTreeRequest) returns(DumpTreeResponse);
|
rpc DumpTree(DumpTreeRequest) returns(DumpTreeResponse);
|
||||||
@ -10,7 +10,7 @@ type rpcHandler struct {
|
|||||||
s *service
|
s *service
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *rpcHandler) PullSpace(ctx context.Context, request *spacesyncproto.SpacePullRequest) (resp *spacesyncproto.SpacePullResponse, err error) {
|
func (r *rpcHandler) SpacePull(ctx context.Context, request *spacesyncproto.SpacePullRequest) (resp *spacesyncproto.SpacePullResponse, err error) {
|
||||||
sp, err := r.s.GetSpace(ctx, request.Id)
|
sp, err := r.s.GetSpace(ctx, request.Id)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if err != spacesyncproto.ErrSpaceMissing {
|
if err != spacesyncproto.ErrSpaceMissing {
|
||||||
@ -37,7 +37,7 @@ func (r *rpcHandler) PullSpace(ctx context.Context, request *spacesyncproto.Spac
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *rpcHandler) PushSpace(ctx context.Context, req *spacesyncproto.SpacePushRequest) (resp *spacesyncproto.SpacePushResponse, err error) {
|
func (r *rpcHandler) SpacePush(ctx context.Context, req *spacesyncproto.SpacePushRequest) (resp *spacesyncproto.SpacePushResponse, err error) {
|
||||||
description := commonspace.SpaceDescription{
|
description := commonspace.SpaceDescription{
|
||||||
SpaceHeader: req.Payload.SpaceHeader,
|
SpaceHeader: req.Payload.SpaceHeader,
|
||||||
AclId: req.Payload.AclPayloadId,
|
AclId: req.Payload.AclPayloadId,
|
||||||
@ -62,7 +62,7 @@ func (r *rpcHandler) HeadSync(ctx context.Context, req *spacesyncproto.HeadSyncR
|
|||||||
return sp.SpaceSyncRpc().HeadSync(ctx, req)
|
return sp.SpaceSyncRpc().HeadSync(ctx, req)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *rpcHandler) Stream(stream spacesyncproto.DRPCSpaceSync_ObjectSyncStreamStream) error {
|
func (r *rpcHandler) ObjectSyncStream(stream spacesyncproto.DRPCSpaceSync_ObjectSyncStreamStream) error {
|
||||||
msg, err := stream.Recv()
|
msg, err := stream.Recv()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|||||||
@ -43,7 +43,7 @@ func (s *service) Init(a *app.App) (err error) {
|
|||||||
ocache.WithGCPeriod(time.Minute),
|
ocache.WithGCPeriod(time.Minute),
|
||||||
ocache.WithTTL(time.Duration(s.conf.GCTTL)*time.Second),
|
ocache.WithTTL(time.Duration(s.conf.GCTTL)*time.Second),
|
||||||
)
|
)
|
||||||
return spacesyncproto.DRPCRegisterSpace(a.MustComponent(server.CName).(server.DRPCServer), &rpcHandler{s})
|
return spacesyncproto.DRPCRegisterSpaceSync(a.MustComponent(server.CName).(server.DRPCServer), &rpcHandler{s})
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *service) Name() (name string) {
|
func (s *service) Name() (name string) {
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import (
|
|||||||
"github.com/anytypeio/go-anytype-infrastructure-experiments/util/cmd/debug/drpcclient"
|
"github.com/anytypeio/go-anytype-infrastructure-experiments/util/cmd/debug/drpcclient"
|
||||||
)
|
)
|
||||||
|
|
||||||
const CName = "commands.client"
|
const CName = "debug.commands.client"
|
||||||
|
|
||||||
var log = logger.NewNamed(CName)
|
var log = logger.NewNamed(CName)
|
||||||
|
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import (
|
|||||||
"github.com/anytypeio/go-anytype-infrastructure-experiments/util/cmd/debug/drpcclient"
|
"github.com/anytypeio/go-anytype-infrastructure-experiments/util/cmd/debug/drpcclient"
|
||||||
)
|
)
|
||||||
|
|
||||||
const CName = "commands.node"
|
const CName = "debug.commands.node"
|
||||||
|
|
||||||
var log = logger.NewNamed(CName)
|
var log = logger.NewNamed(CName)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user