Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DatasyncTicker = 300 * time.Millisecond
Functions ¶
func CalculateSendTime ¶
CalculateSendTime calculates the next epoch at which a message should be sent. We randomize it a bit so that not all messages are sent on the same epoch
Types ¶
type DataSync ¶
type DataSync struct { *datasyncnode.Node // NodeTransport is the implementation of the datasync transport interface. *NodeTransport // contains filtered or unexported fields }
func New ¶
func New(node *datasyncnode.Node, transport *NodeTransport, sendingEnabled bool, logger *zap.Logger) *DataSync
func (*DataSync) UnwrapPayloadsAndAcks ¶ added in v0.71.5
func (d *DataSync) UnwrapPayloadsAndAcks(sender *ecdsa.PublicKey, payload []byte) ([][]byte, [][]byte, error)
UnwrapPayloadsAndAcks tries to unwrap datasync message and return messages payloads and acknowledgements for previously sent messages
type NodeTransport ¶
type NodeTransport struct {
// contains filtered or unexported fields
}
func NewNodeTransport ¶
func NewNodeTransport() *NodeTransport
func (*NodeTransport) AddPacket ¶
func (t *NodeTransport) AddPacket(p transport.Packet)
func (*NodeTransport) Watch ¶
func (t *NodeTransport) Watch() transport.Packet
Click to show internal directories.
Click to hide internal directories.