Documentation
¶
Index ¶
Constants ¶
View Source
const ( MsgTypeIncoming = iota MsgTypeOutgoing MsgTypeIncomingRequest MsgTypeOutgoingRequest MsgTypeReceivedResponse MsgTypeSentResponse )
View Source
const CName = "common.sync.syncdeps"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ObjectSyncHandler ¶
type ObjectSyncHandler interface {
HandleHeadUpdate(ctx context.Context, statusUpdater syncstatus.StatusUpdater, headUpdate drpc.Message) (Request, error)
HandleStreamRequest(ctx context.Context, rq Request, updater QueueSizeUpdater, send func(resp proto.Message) error) (Request, error)
HandleDeprecatedRequest(ctx context.Context, req *spacesyncproto.ObjectSyncMessage) (resp *spacesyncproto.ObjectSyncMessage, err error)
HandleResponse(ctx context.Context, peerId, objectId string, resp Response) error
ResponseCollector() ResponseCollector
}
type QueueSizeUpdater ¶
type RequestSender ¶
type RequestSender interface {
SendRequest(ctx context.Context, rq Request, collector ResponseCollector) error
}
type Response ¶
type Response interface {
multiqueue.Sizeable
}
type ResponseCollector ¶
type SyncHandler ¶
type SyncHandler interface {
app.Component
HandleHeadUpdate(ctx context.Context, headUpdate drpc.Message) (Request, error)
HandleStreamRequest(ctx context.Context, rq Request, updater QueueSizeUpdater, sendResponse func(resp proto.Message) error) (Request, error)
HandleDeprecatedObjectSync(ctx context.Context, req *spacesyncproto.ObjectSyncMessage) (resp *spacesyncproto.ObjectSyncMessage, err error)
ApplyRequest(ctx context.Context, rq Request, requestSender RequestSender) error
TryAddMessage(ctx context.Context, peerId string, msg multiqueue.Sizeable, q *mb.MB[multiqueue.Sizeable]) error
SendStreamRequest(ctx context.Context, rq Request, receive func(stream drpc.Stream) error) (err error)
NewMessage() drpc.Message
}
Click to show internal directories.
Click to hide internal directories.