Documentation ¶
Overview ¶
Package state contains everything related to the synchronization state for MVDS.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrStateNotFound = errors.New("state not found")
)
Functions ¶
func NewMemorySyncState ¶ added in v0.0.25
func NewMemorySyncState() *memorySyncState
func NewPersistentSyncState ¶ added in v0.0.21
Types ¶
type MessageID ¶
type MessageID [32]byte
func ToMessageID ¶ added in v0.0.25
ToMessageID converts a byte array to a MessageID.
type RecordType ¶
type RecordType int
RecordType is the type for a specific record, either `OFFER`, `REQUEST` or `MESSAGE`.
const ( OFFER RecordType = iota REQUEST MESSAGE )
type State ¶
type State struct { Type RecordType SendCount uint64 SendEpoch int64 // GroupID is optional, thus nullable GroupID *GroupID PeerID PeerID MessageID MessageID }
State is a struct used to store a records state(https://github.com/status-im/bigbrother-specs/blob/master/data_sync/mvds.md#state).
Source Files ¶
Click to show internal directories.
Click to hide internal directories.