Remove lastusage from syncclient

This commit is contained in:
mcrakhman 2022-10-24 14:46:24 +02:00 committed by Mikhail Iudin
parent dad0926ede
commit 70f3929f44
No known key found for this signature in database
GPG Key ID: FAAAA8BAABDFF1C0

View File

@ -7,13 +7,10 @@ import (
"github.com/anytypeio/go-anytype-infrastructure-experiments/common/commonspace/syncservice"
"github.com/anytypeio/go-anytype-infrastructure-experiments/common/nodeconf"
"github.com/anytypeio/go-anytype-infrastructure-experiments/common/pkg/acl/treechangeproto"
"github.com/anytypeio/go-anytype-infrastructure-experiments/common/pkg/ocache"
"time"
)
type SyncClient interface {
RequestFactory
ocache.ObjectLastUsage
BroadcastAsync(message *treechangeproto.TreeSyncMessage) (err error)
BroadcastAsyncOrSendResponsible(message *treechangeproto.TreeSyncMessage) (err error)
SendAsync(peerId string, message *treechangeproto.TreeSyncMessage, replyId string) (err error)
@ -42,10 +39,6 @@ func newSyncClient(
}
}
func (s *syncClient) LastUsage() time.Time {
return s.StreamPool.LastUsage()
}
func (s *syncClient) BroadcastAsync(message *treechangeproto.TreeSyncMessage) (err error) {
s.notifyIfNeeded(message)
objMsg, err := marshallTreeMessage(message, message.RootChange.Id, "")