datasync

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2020 License: MPL-2.0 Imports: 11 Imported by: 2 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateSendTime

func CalculateSendTime(count uint64, time int64) int64

CalculateSendTime calculates the next epoch at which a message should be sent.

func ToGroupID

func ToGroupID(data []byte) state.GroupID

func ToOneToOneGroupID

func ToOneToOneGroupID(key1 *ecdsa.PublicKey, key2 *ecdsa.PublicKey) state.GroupID

ToOneToOneGroupID returns a groupID for a onetoonechat, which is taken by concatenating the bytes of the compressed keys, in ascending order by X

Types

type DataSync

type DataSync struct {
	*datasyncnode.Node
	// DataSyncNodeTransport is the implementation of the datasync transport interface.
	*DataSyncNodeTransport
	// contains filtered or unexported fields
}

func New

func New(node *datasyncnode.Node, transport *DataSyncNodeTransport, sendingEnabled bool, logger *zap.Logger) *DataSync

func (*DataSync) Handle

func (d *DataSync) Handle(sender *ecdsa.PublicKey, payload []byte) [][]byte

func (*DataSync) Stop

func (d *DataSync) Stop()

type DataSyncNodeTransport

type DataSyncNodeTransport struct {
	// contains filtered or unexported fields
}

func NewDataSyncNodeTransport

func NewDataSyncNodeTransport() *DataSyncNodeTransport

func (*DataSyncNodeTransport) AddPacket

func (t *DataSyncNodeTransport) AddPacket(p transport.Packet)

func (*DataSyncNodeTransport) Init

func (*DataSyncNodeTransport) Send

func (t *DataSyncNodeTransport) Send(_ state.PeerID, peer state.PeerID, payload protobuf.Payload) error

func (*DataSyncNodeTransport) Watch

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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