rbc

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidRBCType = errors.New("invalid RBC message type")
View Source
var ErrInvalidReqType = errors.New("request is not matching with type.")
View Source
var ErrNoIdMatchingRequest = errors.New("id is not found.")

Functions

This section is empty.

Types

type EchoReqRepository

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

Received request

func NewEchoReqRepository

func NewEchoReqRepository() *EchoReqRepository

func (*EchoReqRepository) Find

func (*EchoReqRepository) FindAll

func (r *EchoReqRepository) FindAll() []cleisthenes.Request

func (*EchoReqRepository) Save

type EchoRequest

type EchoRequest struct {
	ValRequest
}

func (EchoRequest) Recv

func (r EchoRequest) Recv()

type RBC

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

func New

func New(
	n, f int,
	epoch cleisthenes.Epoch,
	owner, proposer cleisthenes.Member,
	broadcaster cleisthenes.Broadcaster,
	dataSender cleisthenes.DataSender,
) (*RBC, error)

func (*RBC) Close

func (rbc *RBC) Close()

func (*RBC) HandleInput

func (rbc *RBC) HandleInput(data []byte) error

MakeReqAndBroadcast make requests and broadcast to other nodes it is used in ACS

func (*RBC) HandleMessage

func (rbc *RBC) HandleMessage(sender cleisthenes.Member, msg *pb.Message_Rbc) error

HandleMessage will used in ACS

type ReadyReqRepository

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

Received request

func NewReadyReqRepository

func NewReadyReqRepository() *ReadyReqRepository

func (*ReadyReqRepository) Find

func (*ReadyReqRepository) FindAll

func (r *ReadyReqRepository) FindAll() []cleisthenes.Request

func (*ReadyReqRepository) Save

type ReadyRequest

type ReadyRequest struct {
	RootHash []byte
}

func (ReadyRequest) Recv

func (r ReadyRequest) Recv()

type ValReqRepository

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

Received request

func NewValReqRepository

func NewValReqRepository() *ValReqRepository

func (*ValReqRepository) Find

func (*ValReqRepository) FindAll

func (r *ValReqRepository) FindAll() []cleisthenes.Request

func (*ValReqRepository) Save

type ValRequest

type ValRequest struct {
	RootHash []byte
	Data     merkletree.Data
	RootPath merkletree.RootPath
	Indexes  []int64
}

func (ValRequest) Recv

func (r ValRequest) Recv()

It means it is abstracted as Request interface (cleisthenes/request.go)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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