svs

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2025 License: MIT Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SvsNodeDesc *schema.NodeImplDesc

Functions

func CreateSvsNode

func CreateSvsNode(node *schema.Node) schema.NodeImpl

Types

type MissingData

type MissingData struct {
	NodeId   enc.Name
	StartSeq uint64
	EndSeq   uint64
}

type SvsNode

type SvsNode struct {
	schema.BaseNodeImpl

	OnMissingData *schema.EventTarget

	SyncInterval        time.Duration
	SuppressionInterval time.Duration
	BaseMatching        enc.Matching
	ChannelSize         uint64
	SelfNodeId          enc.Name
	// 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) CastTo

func (n *SvsNode) CastTo(ptr any) any

func (*SvsNode) GetDataName

func (n *SvsNode) GetDataName(mNode schema.MatchedNode, nodeId []byte, seq uint64) enc.Name

func (*SvsNode) MissingDataChannel

func (n *SvsNode) MissingDataChannel() chan MissingData

func (*SvsNode) MySequence

func (n *SvsNode) MySequence() uint64

func (*SvsNode) NewData

func (n *SvsNode) NewData(mNode schema.MatchedNode, content enc.Wire) enc.Wire

func (*SvsNode) NodeImplTrait

func (n *SvsNode) NodeImplTrait() schema.NodeImpl

type SyncState

type SyncState int
const (
	SyncSteady SyncState = iota
	SyncSuppression
)

Jump to

Keyboard shortcuts

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