honeybadger

package
v0.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ACS

type ACS interface {
	HandleInput(data []byte) error
	HandleMessage(sender cleisthenes.Member, msg *pb.Message) error
	Close()
}

type ACSFactory

type ACSFactory interface {
	Create(epoch cleisthenes.Epoch) (ACS, error)
}

ACSFactory helps create ACS instance easily. To create ACS, we need lots of DI And for the ease of creating ACS, ACSFactory have components which is need to create ACS

type DefaultACSFactory

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

func NewDefaultACSFactory

func NewDefaultACSFactory(
	n int,
	f int,
	acsOwner cleisthenes.Member,
	memberMap cleisthenes.MemberMap,
	dataReceiver cleisthenes.DataReceiver,
	dataSender cleisthenes.DataSender,
	binaryReceiver cleisthenes.BinaryReceiver,
	binarySender cleisthenes.BinarySender,
	batchSender cleisthenes.BatchSender,
	broadcaster cleisthenes.Broadcaster,
) *DefaultACSFactory

func (*DefaultACSFactory) Create

func (f *DefaultACSFactory) Create(epoch cleisthenes.Epoch) (ACS, error)

type Epoch

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

func NewEpoch

func NewEpoch(value cleisthenes.Epoch) *Epoch

type HoneyBadger

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

func New

func New(
	memberMap *cleisthenes.MemberMap,
	acsFactory ACSFactory,
	tpk cleisthenes.Tpke,
	batchReceiver cleisthenes.BatchReceiver,
	resultSender cleisthenes.ResultSender,
) *HoneyBadger

func (*HoneyBadger) Close

func (hb *HoneyBadger) Close()

func (*HoneyBadger) HandleContribution

func (hb *HoneyBadger) HandleContribution(contribution cleisthenes.Contribution)

func (*HoneyBadger) HandleMessage

func (hb *HoneyBadger) HandleMessage(msg *pb.Message) error

func (*HoneyBadger) OnConsensus

func (hb *HoneyBadger) OnConsensus() bool

Jump to

Keyboard shortcuts

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