sobject_sync

package
v0.51.2 Latest Latest
Warning

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

Go to latest
Published: May 7, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const SyncProtocolID = protocol.ID("alpha/so-sync")

SyncProtocolID is the protocol ID used for SO sync solicitation.

Variables

This section is empty.

Functions

This section is empty.

Types

type SOSync

type SOSync struct {
	// contains filtered or unexported fields
}

SOSync manages bidirectional shared object state synchronization over a solicit protocol stream. Each instance syncs one SharedObject with peers connected via the session transport's child bus.

func NewSOSync

func NewSOSync(le *logrus.Entry, b bus.Bus, soID string, soHost *sobject.SOHost) *SOSync

NewSOSync constructs a new SOSync.

func (*SOSync) Execute

func (s *SOSync) Execute(ctx context.Context) error

Execute runs the SO sync, emitting a SolicitProtocol directive and handling matched streams until ctx is canceled.

type SOSyncAck

type SOSyncAck struct {

	// AckedSeqno is the acknowledged sequence number.
	AckedSeqno uint64 `protobuf:"varint,1,opt,name=acked_seqno,json=ackedSeqno,proto3" json:"ackedSeqno,omitempty"`
	// contains filtered or unexported fields
}

SOSyncAck acknowledges receipt up to a sequence number.

func (*SOSyncAck) CloneMessageVT

func (m *SOSyncAck) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*SOSyncAck) CloneVT

func (m *SOSyncAck) CloneVT() *SOSyncAck

func (*SOSyncAck) EqualMessageVT

func (this *SOSyncAck) EqualMessageVT(thatMsg any) bool

func (*SOSyncAck) EqualVT

func (this *SOSyncAck) EqualVT(that *SOSyncAck) bool

func (*SOSyncAck) GetAckedSeqno

func (x *SOSyncAck) GetAckedSeqno() uint64

func (*SOSyncAck) MarshalJSON

func (x *SOSyncAck) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SOSyncAck to JSON.

func (*SOSyncAck) MarshalProtoJSON

func (x *SOSyncAck) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SOSyncAck message to JSON.

func (*SOSyncAck) MarshalProtoText

func (x *SOSyncAck) MarshalProtoText() string

func (*SOSyncAck) MarshalToSizedBufferVT

func (m *SOSyncAck) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SOSyncAck) MarshalToVT

func (m *SOSyncAck) MarshalToVT(dAtA []byte) (int, error)

func (*SOSyncAck) MarshalVT

func (m *SOSyncAck) MarshalVT() (dAtA []byte, err error)

func (*SOSyncAck) ProtoMessage

func (*SOSyncAck) ProtoMessage()

func (*SOSyncAck) Reset

func (x *SOSyncAck) Reset()

func (*SOSyncAck) SizeVT

func (m *SOSyncAck) SizeVT() (n int)

func (*SOSyncAck) String

func (x *SOSyncAck) String() string

func (*SOSyncAck) UnmarshalJSON

func (x *SOSyncAck) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SOSyncAck from JSON.

func (*SOSyncAck) UnmarshalProtoJSON

func (x *SOSyncAck) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SOSyncAck message from JSON.

func (*SOSyncAck) UnmarshalVT

func (m *SOSyncAck) UnmarshalVT(dAtA []byte) error

type SOSyncMessage

type SOSyncMessage struct {

	// Body is the message body.
	//
	// Types that are assignable to Body:
	//
	//	*SOSyncMessage_Snapshot
	//	*SOSyncMessage_Op
	//	*SOSyncMessage_Ack
	Body isSOSyncMessage_Body `protobuf_oneof:"body"`
	// contains filtered or unexported fields
}

SOSyncMessage is the bidirectional message on the solicit stream.

func (*SOSyncMessage) CloneMessageVT

func (m *SOSyncMessage) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*SOSyncMessage) CloneVT

func (m *SOSyncMessage) CloneVT() *SOSyncMessage

func (*SOSyncMessage) EqualMessageVT

func (this *SOSyncMessage) EqualMessageVT(thatMsg any) bool

func (*SOSyncMessage) EqualVT

func (this *SOSyncMessage) EqualVT(that *SOSyncMessage) bool

func (*SOSyncMessage) GetAck

func (x *SOSyncMessage) GetAck() *SOSyncAck

func (*SOSyncMessage) GetBody

func (m *SOSyncMessage) GetBody() isSOSyncMessage_Body

func (*SOSyncMessage) GetOp

func (x *SOSyncMessage) GetOp() *SOSyncOp

func (*SOSyncMessage) GetSnapshot

func (x *SOSyncMessage) GetSnapshot() *SOSyncSnapshot

func (*SOSyncMessage) MarshalJSON

func (x *SOSyncMessage) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SOSyncMessage to JSON.

func (*SOSyncMessage) MarshalProtoJSON

func (x *SOSyncMessage) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SOSyncMessage message to JSON.

func (*SOSyncMessage) MarshalProtoText

func (x *SOSyncMessage) MarshalProtoText() string

func (*SOSyncMessage) MarshalToSizedBufferVT

func (m *SOSyncMessage) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SOSyncMessage) MarshalToVT

func (m *SOSyncMessage) MarshalToVT(dAtA []byte) (int, error)

func (*SOSyncMessage) MarshalVT

func (m *SOSyncMessage) MarshalVT() (dAtA []byte, err error)

func (*SOSyncMessage) ProtoMessage

func (*SOSyncMessage) ProtoMessage()

func (*SOSyncMessage) Reset

func (x *SOSyncMessage) Reset()

func (*SOSyncMessage) SizeVT

func (m *SOSyncMessage) SizeVT() (n int)

func (*SOSyncMessage) String

func (x *SOSyncMessage) String() string

func (*SOSyncMessage) UnmarshalJSON

func (x *SOSyncMessage) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SOSyncMessage from JSON.

func (*SOSyncMessage) UnmarshalProtoJSON

func (x *SOSyncMessage) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SOSyncMessage message from JSON.

func (*SOSyncMessage) UnmarshalVT

func (m *SOSyncMessage) UnmarshalVT(dAtA []byte) error

type SOSyncMessage_Ack

type SOSyncMessage_Ack struct {
	// Ack acknowledges receipt up to a sequence number.
	Ack *SOSyncAck `protobuf:"bytes,3,opt,name=ack,proto3,oneof"`
}

func (*SOSyncMessage_Ack) CloneOneofVT

func (m *SOSyncMessage_Ack) CloneOneofVT() isSOSyncMessage_Body

func (*SOSyncMessage_Ack) CloneVT

func (m *SOSyncMessage_Ack) CloneVT() *SOSyncMessage_Ack

func (*SOSyncMessage_Ack) EqualVT

func (this *SOSyncMessage_Ack) EqualVT(thatIface isSOSyncMessage_Body) bool

func (*SOSyncMessage_Ack) MarshalToSizedBufferVT

func (m *SOSyncMessage_Ack) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SOSyncMessage_Ack) MarshalToVT

func (m *SOSyncMessage_Ack) MarshalToVT(dAtA []byte) (int, error)

func (*SOSyncMessage_Ack) SizeVT

func (m *SOSyncMessage_Ack) SizeVT() (n int)

type SOSyncMessage_Op

type SOSyncMessage_Op struct {
	// Op carries a signed operation for the peer to apply.
	Op *SOSyncOp `protobuf:"bytes,2,opt,name=op,proto3,oneof"`
}

func (*SOSyncMessage_Op) CloneOneofVT

func (m *SOSyncMessage_Op) CloneOneofVT() isSOSyncMessage_Body

func (*SOSyncMessage_Op) CloneVT

func (m *SOSyncMessage_Op) CloneVT() *SOSyncMessage_Op

func (*SOSyncMessage_Op) EqualVT

func (this *SOSyncMessage_Op) EqualVT(thatIface isSOSyncMessage_Body) bool

func (*SOSyncMessage_Op) MarshalToSizedBufferVT

func (m *SOSyncMessage_Op) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SOSyncMessage_Op) MarshalToVT

func (m *SOSyncMessage_Op) MarshalToVT(dAtA []byte) (int, error)

func (*SOSyncMessage_Op) SizeVT

func (m *SOSyncMessage_Op) SizeVT() (n int)

type SOSyncMessage_Snapshot

type SOSyncMessage_Snapshot struct {
	// Snapshot is a full SOState snapshot exchanged on stream connect.
	Snapshot *SOSyncSnapshot `protobuf:"bytes,1,opt,name=snapshot,proto3,oneof"`
}

func (*SOSyncMessage_Snapshot) CloneOneofVT

func (m *SOSyncMessage_Snapshot) CloneOneofVT() isSOSyncMessage_Body

func (*SOSyncMessage_Snapshot) CloneVT

func (*SOSyncMessage_Snapshot) EqualVT

func (this *SOSyncMessage_Snapshot) EqualVT(thatIface isSOSyncMessage_Body) bool

func (*SOSyncMessage_Snapshot) MarshalToSizedBufferVT

func (m *SOSyncMessage_Snapshot) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SOSyncMessage_Snapshot) MarshalToVT

func (m *SOSyncMessage_Snapshot) MarshalToVT(dAtA []byte) (int, error)

func (*SOSyncMessage_Snapshot) SizeVT

func (m *SOSyncMessage_Snapshot) SizeVT() (n int)

type SOSyncOp

type SOSyncOp struct {

	// Operation is the SOOperation proto bytes (MarshalVT).
	Operation []byte `protobuf:"bytes,1,opt,name=operation,proto3" json:"operation,omitempty"`
	// Nonce is the sender's nonce counter.
	Nonce uint64 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"`
	// PeerId is the sender's peer ID (raw multihash bytes).
	PeerId []byte `protobuf:"bytes,3,opt,name=peer_id,json=peerId,proto3" json:"peerId,omitempty"`
	// contains filtered or unexported fields
}

SOSyncOp carries a signed operation for the peer to apply.

func (*SOSyncOp) CloneMessageVT

func (m *SOSyncOp) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*SOSyncOp) CloneVT

func (m *SOSyncOp) CloneVT() *SOSyncOp

func (*SOSyncOp) EqualMessageVT

func (this *SOSyncOp) EqualMessageVT(thatMsg any) bool

func (*SOSyncOp) EqualVT

func (this *SOSyncOp) EqualVT(that *SOSyncOp) bool

func (*SOSyncOp) GetNonce

func (x *SOSyncOp) GetNonce() uint64

func (*SOSyncOp) GetOperation

func (x *SOSyncOp) GetOperation() []byte

func (*SOSyncOp) GetPeerId

func (x *SOSyncOp) GetPeerId() []byte

func (*SOSyncOp) MarshalJSON

func (x *SOSyncOp) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SOSyncOp to JSON.

func (*SOSyncOp) MarshalProtoJSON

func (x *SOSyncOp) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SOSyncOp message to JSON.

func (*SOSyncOp) MarshalProtoText

func (x *SOSyncOp) MarshalProtoText() string

func (*SOSyncOp) MarshalToSizedBufferVT

func (m *SOSyncOp) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SOSyncOp) MarshalToVT

func (m *SOSyncOp) MarshalToVT(dAtA []byte) (int, error)

func (*SOSyncOp) MarshalVT

func (m *SOSyncOp) MarshalVT() (dAtA []byte, err error)

func (*SOSyncOp) ProtoMessage

func (*SOSyncOp) ProtoMessage()

func (*SOSyncOp) Reset

func (x *SOSyncOp) Reset()

func (*SOSyncOp) SizeVT

func (m *SOSyncOp) SizeVT() (n int)

func (*SOSyncOp) String

func (x *SOSyncOp) String() string

func (*SOSyncOp) UnmarshalJSON

func (x *SOSyncOp) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SOSyncOp from JSON.

func (*SOSyncOp) UnmarshalProtoJSON

func (x *SOSyncOp) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SOSyncOp message from JSON.

func (*SOSyncOp) UnmarshalVT

func (m *SOSyncOp) UnmarshalVT(dAtA []byte) error

type SOSyncSnapshot

type SOSyncSnapshot struct {

	// SoState is the full SOState proto bytes (MarshalVT).
	SoState []byte `protobuf:"bytes,1,opt,name=so_state,json=soState,proto3" json:"soState,omitempty"`
	// RootSeqno is the inner_seqno from SORoot.
	RootSeqno uint64 `protobuf:"varint,2,opt,name=root_seqno,json=rootSeqno,proto3" json:"rootSeqno,omitempty"`
	// contains filtered or unexported fields
}

SOSyncSnapshot is a full SOState snapshot exchanged on stream connect.

func (*SOSyncSnapshot) CloneMessageVT

func (m *SOSyncSnapshot) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*SOSyncSnapshot) CloneVT

func (m *SOSyncSnapshot) CloneVT() *SOSyncSnapshot

func (*SOSyncSnapshot) EqualMessageVT

func (this *SOSyncSnapshot) EqualMessageVT(thatMsg any) bool

func (*SOSyncSnapshot) EqualVT

func (this *SOSyncSnapshot) EqualVT(that *SOSyncSnapshot) bool

func (*SOSyncSnapshot) GetRootSeqno

func (x *SOSyncSnapshot) GetRootSeqno() uint64

func (*SOSyncSnapshot) GetSoState

func (x *SOSyncSnapshot) GetSoState() []byte

func (*SOSyncSnapshot) MarshalJSON

func (x *SOSyncSnapshot) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SOSyncSnapshot to JSON.

func (*SOSyncSnapshot) MarshalProtoJSON

func (x *SOSyncSnapshot) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SOSyncSnapshot message to JSON.

func (*SOSyncSnapshot) MarshalProtoText

func (x *SOSyncSnapshot) MarshalProtoText() string

func (*SOSyncSnapshot) MarshalToSizedBufferVT

func (m *SOSyncSnapshot) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SOSyncSnapshot) MarshalToVT

func (m *SOSyncSnapshot) MarshalToVT(dAtA []byte) (int, error)

func (*SOSyncSnapshot) MarshalVT

func (m *SOSyncSnapshot) MarshalVT() (dAtA []byte, err error)

func (*SOSyncSnapshot) ProtoMessage

func (*SOSyncSnapshot) ProtoMessage()

func (*SOSyncSnapshot) Reset

func (x *SOSyncSnapshot) Reset()

func (*SOSyncSnapshot) SizeVT

func (m *SOSyncSnapshot) SizeVT() (n int)

func (*SOSyncSnapshot) String

func (x *SOSyncSnapshot) String() string

func (*SOSyncSnapshot) UnmarshalJSON

func (x *SOSyncSnapshot) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SOSyncSnapshot from JSON.

func (*SOSyncSnapshot) UnmarshalProtoJSON

func (x *SOSyncSnapshot) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SOSyncSnapshot message from JSON.

func (*SOSyncSnapshot) UnmarshalVT

func (m *SOSyncSnapshot) UnmarshalVT(dAtA []byte) error

Jump to

Keyboard shortcuts

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