objectmessages

package
v0.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

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) PeerId

func (h *HeadUpdate) PeerId() string

func (*HeadUpdate) ProtoMessage

func (h *HeadUpdate) ProtoMessage() (proto.Message, error)

func (*HeadUpdate) SetPeerId

func (h *HeadUpdate) SetPeerId(peerId string)

func (*HeadUpdate) SetProtoMessage

func (h *HeadUpdate) SetProtoMessage(message proto.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
}

type InnerRequest

type InnerRequest interface {
	Marshall() ([]byte, error)
	MsgSize() uint64
}

type ObjectMeta

type ObjectMeta struct {
	PeerId   string
	ObjectId string
	SpaceId  string
}

type Request

type Request struct {
	Inner InnerRequest
	Bytes []byte
	// contains filtered or unexported fields
}

func NewByteRequest

func NewByteRequest(peerId, spaceId, objectId string, message []byte) *Request

func NewRequest

func NewRequest(peerId, spaceId, objectId string, inner InnerRequest) *Request

func (*Request) MsgSize

func (r *Request) MsgSize() uint64

func (*Request) ObjectId

func (r *Request) ObjectId() string

func (*Request) PeerId

func (r *Request) PeerId() string

func (*Request) Proto

func (r *Request) Proto() (proto.Message, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL