pulsar

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2018 License: Apache-2.0 Imports: 7 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entropy

type Entropy [64]byte

type EntropyGenerator

type EntropyGenerator interface {
	GenerateEntropy() Entropy
}

type Pulsar

type Pulsar struct {
	Sock       net.Listener
	Neighbours map[string]net.Conn
}

func NewPulsar

func NewPulsar(configuration configuration.Pulsar) *Pulsar

func (*Pulsar) Close

func (pulsar *Pulsar) Close()

func (*Pulsar) ConnectToNeighbour

func (pulsar *Pulsar) ConnectToNeighbour(address string, connectionType string) error

func (*Pulsar) Listen

func (pulsar *Pulsar) Listen()

func (*Pulsar) Send

func (pulsar *Pulsar) Send(address string, data interface{})

type Pulse

type Pulse struct {
	PulseNumber uint64
	Entropy     Entropy
}

Base data struct for a pulse

func NewPulse

func NewPulse(previousPulseNumber uint64, entropyGenerator EntropyGenerator) *Pulse

Create a new pulse with using of custom Entropy Generator

type StandardEntropyGenerator

type StandardEntropyGenerator struct {
}

func (*StandardEntropyGenerator) GenerateEntropy

func (generator *StandardEntropyGenerator) GenerateEntropy() Entropy

Jump to

Keyboard shortcuts

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