Documentation ¶
Index ¶
Constants ¶
View Source
const CName = "common.commonspace.sync"
Variables ¶
View Source
var ErrUnexpectedMessage = errors.New("unexpected message")
Functions ¶
This section is empty.
Types ¶
type HandleMessage ¶
type RequestManager ¶
type RequestManager interface { QueueRequest(rq syncdeps.Request) error SendRequest(ctx context.Context, rq syncdeps.Request, collector syncdeps.ResponseCollector) error HandleStreamRequest(ctx context.Context, rq syncdeps.Request, stream drpc.Stream) error HandleDeprecatedObjectSync(ctx context.Context, req *spacesyncproto.ObjectSyncMessage) (resp *spacesyncproto.ObjectSyncMessage, err error) Close() }
func NewRequestManager ¶
func NewRequestManager(handler syncdeps.SyncHandler, metric syncdeps.QueueSizeUpdater, responsibleNodeIds []string) RequestManager
type RequestPool ¶
type RequestPool interface { TryTake(peerId, objectId string) bool Release(peerId, objectId string) QueueRequestAction(peerId, objectId string, action func(ctx context.Context), remove func()) (err error) Close() }
func NewRequestPool ¶
func NewRequestPool(closePeriod, gcPeriod time.Duration) RequestPool
type SyncService ¶
type SyncService interface { app.Component BroadcastMessage(ctx context.Context, msg drpc.Message) error HandleDeprecatedObjectSync(ctx context.Context, req *spacesyncproto.ObjectSyncMessage) (resp *spacesyncproto.ObjectSyncMessage, err error) HandleStreamRequest(ctx context.Context, req syncdeps.Request, stream drpc.Stream) error SendRequest(ctx context.Context, rq syncdeps.Request, collector syncdeps.ResponseCollector) error QueueRequest(ctx context.Context, rq syncdeps.Request) error CloseReceiveQueue(id string) error }
func NewSyncService ¶
func NewSyncService() SyncService
Source Files ¶
Click to show internal directories.
Click to hide internal directories.