bmmc

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// GossipAddr is HTTP address for node which runs gossip round
	GossipAddr string
	// GossipPort is HTTP port for node which runs gossip round
	GossipPort string
	// HTTPAddr is http server address
	HTTPAddr string
	// HTTPPort is http server port
	HTTPPort string
	// PeerBuf is the list of peers
	Peers []peer.Peer
	// Beta is the expected fanout for gossip rounds
	Beta float64
}

type Protocol

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

func New

func New(cfg Config) *Protocol

New creates a new instance for the protocol

func (*Protocol) AddMessage

func (p *Protocol) AddMessage(msg string)

func (*Protocol) GetMessages

func (p *Protocol) GetMessages() []string

func (*Protocol) Start

func (p *Protocol) Start() error

Start starts the gossip server and the http server

func (*Protocol) Stop

func (p *Protocol) Stop()

Stop stops the gossip server and the http server

Jump to

Keyboard shortcuts

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