acs

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: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoMemberMatchingRequest = errors.New("member is not found")

Functions

func NewBinaryStateMap

func NewBinaryStateMap() binaryStateMap

func NewbroadcastDataMap

func NewbroadcastDataMap() broadcastDataMap

Types

type ACS

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

func New

func New(
	n int,
	f int,
	epoch cleisthenes.Epoch,
	owner cleisthenes.Member,
	memberMap cleisthenes.MemberMap,
	dataReceiver cleisthenes.DataReceiver,
	dataSender cleisthenes.DataSender,
	binaryReceiver cleisthenes.BinaryReceiver,
	binarySender cleisthenes.BinarySender,
	batchSender cleisthenes.BatchSender,
	broadCaster cleisthenes.Broadcaster,
) (*ACS, error)

TODO : the coin generator must be injected outside the ACS, BBA should has it's own coin generator. TODO : if we consider dynamic network, change MemberMap into pointer

func (*ACS) Close

func (acs *ACS) Close()

func (*ACS) HandleInput

func (acs *ACS) HandleInput(data []byte) error

HandleInput receive encrypted batch from honeybadger

func (*ACS) HandleMessage

func (acs *ACS) HandleMessage(sender cleisthenes.Member, msg *pb.Message) error

func (*ACS) Result

func (acs *ACS) Result() cleisthenes.Batch

Result return consensused batch to honeybadger component

type BBA

type BBA interface {
	HandleInput(round uint64, bvalRequest *bba.BvalRequest) error
	HandleMessage(sender cleisthenes.Member, msg *pb.Message_Bba) error
	Close()
	Idle() bool
	Round() uint64
}

type BBARepository

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

func NewBBARepository

func NewBBARepository() *BBARepository

func (*BBARepository) Find

func (r *BBARepository) Find(mem cleisthenes.Member) (BBA, error)

func (*BBARepository) FindAll

func (r *BBARepository) FindAll() []BBA

func (*BBARepository) Save

func (r *BBARepository) Save(mem cleisthenes.Member, bba BBA)

type RBC

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

type RBCRepository

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

func NewRBCRepository

func NewRBCRepository() *RBCRepository

func (*RBCRepository) Find

func (r *RBCRepository) Find(mem cleisthenes.Member) (RBC, error)

func (*RBCRepository) FindAll

func (r *RBCRepository) FindAll() []RBC

func (*RBCRepository) Save

func (r *RBCRepository) Save(mem cleisthenes.Member, rbc RBC)

Jump to

Keyboard shortcuts

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