Documentation
¶
Index ¶
- Constants
- type SOSync
- type SOSyncAck
- func (m *SOSyncAck) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *SOSyncAck) CloneVT() *SOSyncAck
- func (this *SOSyncAck) EqualMessageVT(thatMsg any) bool
- func (this *SOSyncAck) EqualVT(that *SOSyncAck) bool
- func (x *SOSyncAck) GetAckedSeqno() uint64
- func (x *SOSyncAck) MarshalJSON() ([]byte, error)
- func (x *SOSyncAck) MarshalProtoJSON(s *json.MarshalState)
- func (x *SOSyncAck) MarshalProtoText() string
- func (m *SOSyncAck) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *SOSyncAck) MarshalToVT(dAtA []byte) (int, error)
- func (m *SOSyncAck) MarshalVT() (dAtA []byte, err error)
- func (*SOSyncAck) ProtoMessage()
- func (x *SOSyncAck) Reset()
- func (m *SOSyncAck) SizeVT() (n int)
- func (x *SOSyncAck) String() string
- func (x *SOSyncAck) UnmarshalJSON(b []byte) error
- func (x *SOSyncAck) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *SOSyncAck) UnmarshalVT(dAtA []byte) error
- type SOSyncMessage
- func (m *SOSyncMessage) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *SOSyncMessage) CloneVT() *SOSyncMessage
- func (this *SOSyncMessage) EqualMessageVT(thatMsg any) bool
- func (this *SOSyncMessage) EqualVT(that *SOSyncMessage) bool
- func (x *SOSyncMessage) GetAck() *SOSyncAck
- func (m *SOSyncMessage) GetBody() isSOSyncMessage_Body
- func (x *SOSyncMessage) GetOp() *SOSyncOp
- func (x *SOSyncMessage) GetSnapshot() *SOSyncSnapshot
- func (x *SOSyncMessage) MarshalJSON() ([]byte, error)
- func (x *SOSyncMessage) MarshalProtoJSON(s *json.MarshalState)
- func (x *SOSyncMessage) MarshalProtoText() string
- func (m *SOSyncMessage) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *SOSyncMessage) MarshalToVT(dAtA []byte) (int, error)
- func (m *SOSyncMessage) MarshalVT() (dAtA []byte, err error)
- func (*SOSyncMessage) ProtoMessage()
- func (x *SOSyncMessage) Reset()
- func (m *SOSyncMessage) SizeVT() (n int)
- func (x *SOSyncMessage) String() string
- func (x *SOSyncMessage) UnmarshalJSON(b []byte) error
- func (x *SOSyncMessage) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *SOSyncMessage) UnmarshalVT(dAtA []byte) error
- type SOSyncMessage_Ack
- func (m *SOSyncMessage_Ack) CloneOneofVT() isSOSyncMessage_Body
- func (m *SOSyncMessage_Ack) CloneVT() *SOSyncMessage_Ack
- func (this *SOSyncMessage_Ack) EqualVT(thatIface isSOSyncMessage_Body) bool
- func (m *SOSyncMessage_Ack) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *SOSyncMessage_Ack) MarshalToVT(dAtA []byte) (int, error)
- func (m *SOSyncMessage_Ack) SizeVT() (n int)
- type SOSyncMessage_Op
- func (m *SOSyncMessage_Op) CloneOneofVT() isSOSyncMessage_Body
- func (m *SOSyncMessage_Op) CloneVT() *SOSyncMessage_Op
- func (this *SOSyncMessage_Op) EqualVT(thatIface isSOSyncMessage_Body) bool
- func (m *SOSyncMessage_Op) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *SOSyncMessage_Op) MarshalToVT(dAtA []byte) (int, error)
- func (m *SOSyncMessage_Op) SizeVT() (n int)
- type SOSyncMessage_Snapshot
- func (m *SOSyncMessage_Snapshot) CloneOneofVT() isSOSyncMessage_Body
- func (m *SOSyncMessage_Snapshot) CloneVT() *SOSyncMessage_Snapshot
- func (this *SOSyncMessage_Snapshot) EqualVT(thatIface isSOSyncMessage_Body) bool
- func (m *SOSyncMessage_Snapshot) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *SOSyncMessage_Snapshot) MarshalToVT(dAtA []byte) (int, error)
- func (m *SOSyncMessage_Snapshot) SizeVT() (n int)
- type SOSyncOp
- func (m *SOSyncOp) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *SOSyncOp) CloneVT() *SOSyncOp
- func (this *SOSyncOp) EqualMessageVT(thatMsg any) bool
- func (this *SOSyncOp) EqualVT(that *SOSyncOp) bool
- func (x *SOSyncOp) GetNonce() uint64
- func (x *SOSyncOp) GetOperation() []byte
- func (x *SOSyncOp) GetPeerId() []byte
- func (x *SOSyncOp) MarshalJSON() ([]byte, error)
- func (x *SOSyncOp) MarshalProtoJSON(s *json.MarshalState)
- func (x *SOSyncOp) MarshalProtoText() string
- func (m *SOSyncOp) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *SOSyncOp) MarshalToVT(dAtA []byte) (int, error)
- func (m *SOSyncOp) MarshalVT() (dAtA []byte, err error)
- func (*SOSyncOp) ProtoMessage()
- func (x *SOSyncOp) Reset()
- func (m *SOSyncOp) SizeVT() (n int)
- func (x *SOSyncOp) String() string
- func (x *SOSyncOp) UnmarshalJSON(b []byte) error
- func (x *SOSyncOp) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *SOSyncOp) UnmarshalVT(dAtA []byte) error
- type SOSyncSnapshot
- func (m *SOSyncSnapshot) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *SOSyncSnapshot) CloneVT() *SOSyncSnapshot
- func (this *SOSyncSnapshot) EqualMessageVT(thatMsg any) bool
- func (this *SOSyncSnapshot) EqualVT(that *SOSyncSnapshot) bool
- func (x *SOSyncSnapshot) GetRootSeqno() uint64
- func (x *SOSyncSnapshot) GetSoState() []byte
- func (x *SOSyncSnapshot) MarshalJSON() ([]byte, error)
- func (x *SOSyncSnapshot) MarshalProtoJSON(s *json.MarshalState)
- func (x *SOSyncSnapshot) MarshalProtoText() string
- func (m *SOSyncSnapshot) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *SOSyncSnapshot) MarshalToVT(dAtA []byte) (int, error)
- func (m *SOSyncSnapshot) MarshalVT() (dAtA []byte, err error)
- func (*SOSyncSnapshot) ProtoMessage()
- func (x *SOSyncSnapshot) Reset()
- func (m *SOSyncSnapshot) SizeVT() (n int)
- func (x *SOSyncSnapshot) String() string
- func (x *SOSyncSnapshot) UnmarshalJSON(b []byte) error
- func (x *SOSyncSnapshot) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *SOSyncSnapshot) UnmarshalVT(dAtA []byte) error
- type SnapshotAccessValidator
Constants ¶
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
}
func NewSOSync ¶
func NewSOSync( le *logrus.Entry, b bus.Bus, soID string, localObjectPeerID peer.ID, soHost *sobject.SOHost, accessValidators ...SnapshotAccessValidator, ) *SOSync
NewSOSync constructs a new SOSync.
localObjectPeerID is the local storage identity checked against inbound state. The transport peer routes the sync stream but need not be a Space participant.
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) EqualMessageVT ¶
func (*SOSyncAck) GetAckedSeqno ¶
func (*SOSyncAck) MarshalJSON ¶
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 (*SOSyncAck) MarshalToSizedBufferVT ¶
func (*SOSyncAck) ProtoMessage ¶
func (*SOSyncAck) ProtoMessage()
func (*SOSyncAck) UnmarshalJSON ¶
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 ¶
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 (m *SOSyncMessage_Snapshot) CloneVT() *SOSyncMessage_Snapshot
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) EqualMessageVT ¶
func (*SOSyncOp) GetOperation ¶
func (*SOSyncOp) MarshalJSON ¶
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 (*SOSyncOp) MarshalToSizedBufferVT ¶
func (*SOSyncOp) ProtoMessage ¶
func (*SOSyncOp) ProtoMessage()
func (*SOSyncOp) UnmarshalJSON ¶
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 ¶
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
type SnapshotAccessValidator ¶ added in v0.57.2
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. SnapshotAccessValidator verifies that the local object identity can decode an inbound snapshot before it replaces durable state.