Documentation ¶
Overview ¶
Generated by the generator, DO NOT modify manually
Index ¶
- Variables
- func CreateSvsNode(node *schema.Node) schema.NodeImpl
- type MissingData
- type StateVec
- type StateVecAppParam
- type StateVecEncoder
- type StateVecEntry
- type StateVecEntryEncoder
- type StateVecEntryParsingContext
- type StateVecParsingContext
- type SvsNode
- func (n *SvsNode) CastTo(ptr any) any
- func (n *SvsNode) GetDataName(mNode schema.MatchedNode, nodeId []byte, seq uint64) enc.Name
- func (n *SvsNode) MissingDataChannel() chan MissingData
- func (n *SvsNode) MySequence() uint64
- func (n *SvsNode) NewData(mNode schema.MatchedNode, content enc.Wire) enc.Wire
- func (n *SvsNode) NodeImplTrait() schema.NodeImpl
- type SyncState
Constants ¶
This section is empty.
Variables ¶
View Source
var SvsNodeDesc *schema.NodeImplDesc
Functions ¶
Types ¶
type MissingData ¶
type StateVec ¶
type StateVec struct { //+field:sequence:*StateVecEntry:struct:StateVecEntry Entries []*StateVecEntry `tlv:"0xca"` }
func ParseStateVec ¶
func ParseStateVec(reader enc.ParseReader, ignoreCritical bool) (*StateVec, error)
type StateVecAppParam ¶
type StateVecAppParam struct { //+field:struct:StateVec Entries []*StateVec `tlv:"0xc9"` }
type StateVecEncoder ¶
type StateVecEncoder struct { Entries_subencoder []struct { Entries_encoder StateVecEntryEncoder } // contains filtered or unexported fields }
func (*StateVecEncoder) EncodeInto ¶
func (encoder *StateVecEncoder) EncodeInto(value *StateVec, buf []byte)
func (*StateVecEncoder) Init ¶
func (encoder *StateVecEncoder) Init(value *StateVec)
type StateVecEntry ¶
type StateVecEntry struct { //+field:binary NodeId []byte `tlv:"0x07"` //+field:natural SeqNo uint64 `tlv:"0xcc"` }
func ParseStateVecEntry ¶
func ParseStateVecEntry(reader enc.ParseReader, ignoreCritical bool) (*StateVecEntry, error)
func (*StateVecEntry) Bytes ¶
func (value *StateVecEntry) Bytes() []byte
func (*StateVecEntry) Encode ¶
func (value *StateVecEntry) Encode() enc.Wire
type StateVecEntryEncoder ¶
type StateVecEntryEncoder struct {
// contains filtered or unexported fields
}
func (*StateVecEntryEncoder) Encode ¶
func (encoder *StateVecEntryEncoder) Encode(value *StateVecEntry) enc.Wire
func (*StateVecEntryEncoder) EncodeInto ¶
func (encoder *StateVecEntryEncoder) EncodeInto(value *StateVecEntry, buf []byte)
func (*StateVecEntryEncoder) Init ¶
func (encoder *StateVecEntryEncoder) Init(value *StateVecEntry)
type StateVecEntryParsingContext ¶
type StateVecEntryParsingContext struct { }
func (*StateVecEntryParsingContext) Init ¶
func (context *StateVecEntryParsingContext) Init()
func (*StateVecEntryParsingContext) Parse ¶
func (context *StateVecEntryParsingContext) Parse(reader enc.ParseReader, ignoreCritical bool) (*StateVecEntry, error)
type StateVecParsingContext ¶
type StateVecParsingContext struct {
Entries_context StateVecEntryParsingContext
}
func (*StateVecParsingContext) Init ¶
func (context *StateVecParsingContext) Init()
func (*StateVecParsingContext) Parse ¶
func (context *StateVecParsingContext) Parse(reader enc.ParseReader, ignoreCritical bool) (*StateVec, error)
type SvsNode ¶
type SvsNode struct { schema.BaseNodeImpl OnMissingData *schema.EventTarget SyncInterval time.Duration SuppressionInterval time.Duration BaseMatching enc.Matching ChannelSize uint64 SelfNodeId []byte // contains filtered or unexported fields }
SvsNode implements the StateVectorSync but works for only one instance. Similar is RegisterPolicy. A better implementation is needed if there is a need that multiple producers under the same name pattern that runs on the same application instance. It would also be more natural if we make 1-1 mapping between MatchedNodes and SVS instances, instead of the Node and the SVS instance, which is against the philosophy of matching. Also, this sample always starts from sequence number 0.
func (*SvsNode) GetDataName ¶
func (*SvsNode) MissingDataChannel ¶
func (n *SvsNode) MissingDataChannel() chan MissingData
func (*SvsNode) MySequence ¶
func (*SvsNode) NodeImplTrait ¶
Click to show internal directories.
Click to hide internal directories.