Documentation
¶
Index ¶
- func FreeHeadUpdate(update *HeadUpdate)
- func NewMessage() *spacesyncproto.ObjectSyncMessage
- type BroadcastOptions
- type HeadUpdate
- func (h *HeadUpdate) Copy() drpc.Message
- func (h *HeadUpdate) MsgSize() uint64
- func (h *HeadUpdate) ObjectId() string
- func (h *HeadUpdate) ObjectType() spacesyncproto.ObjectType
- func (h *HeadUpdate) PeerId() string
- func (h *HeadUpdate) ProtoMessage() (protobuf.Message, error)
- func (h *HeadUpdate) SetPeerId(peerId string)
- func (h *HeadUpdate) SetProtoMessage(message protobuf.Message) error
- func (h *HeadUpdate) Size() int
- func (h *HeadUpdate) SpaceId() string
- type InnerHeadUpdate
- type InnerRequest
- type ObjectMeta
- type Request
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FreeHeadUpdate ¶
func FreeHeadUpdate(update *HeadUpdate)
func NewMessage ¶
func NewMessage() *spacesyncproto.ObjectSyncMessage
Types ¶
type BroadcastOptions ¶
type BroadcastOptions struct {
EmptyPeers []string
}
type HeadUpdate ¶
type HeadUpdate struct {
Meta ObjectMeta
Bytes []byte
Update InnerHeadUpdate
// contains filtered or unexported fields
}
func (*HeadUpdate) Copy ¶
func (h *HeadUpdate) Copy() drpc.Message
func (*HeadUpdate) MsgSize ¶
func (h *HeadUpdate) MsgSize() uint64
func (*HeadUpdate) ObjectId ¶
func (h *HeadUpdate) ObjectId() string
func (*HeadUpdate) ObjectType ¶ added in v0.6.12
func (h *HeadUpdate) ObjectType() spacesyncproto.ObjectType
func (*HeadUpdate) PeerId ¶
func (h *HeadUpdate) PeerId() string
func (*HeadUpdate) ProtoMessage ¶
func (h *HeadUpdate) ProtoMessage() (protobuf.Message, error)
func (*HeadUpdate) SetPeerId ¶
func (h *HeadUpdate) SetPeerId(peerId string)
func (*HeadUpdate) SetProtoMessage ¶
func (h *HeadUpdate) SetProtoMessage(message protobuf.Message) error
func (*HeadUpdate) Size ¶
func (h *HeadUpdate) Size() int
func (*HeadUpdate) SpaceId ¶
func (h *HeadUpdate) SpaceId() string
type InnerHeadUpdate ¶
type InnerHeadUpdate interface {
Marshall(data ObjectMeta) ([]byte, error)
Prepare() error
Heads() []string
MsgSize() uint64
ObjectType() spacesyncproto.ObjectType
}
type InnerRequest ¶
type ObjectMeta ¶
type Request ¶
type Request struct {
Inner InnerRequest
Bytes []byte
// contains filtered or unexported fields
}
func NewByteRequest ¶
func NewRequest ¶
func NewRequest(peerId, spaceId, objectId string, inner InnerRequest) *Request
Click to show internal directories.
Click to hide internal directories.