Documentation ¶
Overview ¶
Package backend is a generated protocol buffer package.
It is generated from these files:
backend/consensus.proto
It has these top-level messages:
Handshake
Index ¶
- func CheckSig(publicKey crypto.PublicKey, data []byte, sig []byte) error
- func RegisterConsensusServer(s *grpc.Server, srv ConsensusServer)
- func Sign(privateKey crypto.PrivateKey, data []byte) []byte
- type Backend
- func (b *Backend) AddReceiver(chainId string, recv s.Receiver)
- func (b *Backend) AddSbftPeer(chainID string, support multichain.ConsenterSupport, config *s.Config) (*s.SBFT, error)
- func (b *Backend) Broadcast(msg *s.MultiChainMsg) error
- func (b *Backend) CheckSig(data []byte, src uint64, sig []byte) error
- func (b *Backend) Cut(chainID string) ([]*s.Request, []filter.Committer)
- func (b *Backend) Deliver(chainId string, batch *s.Batch, committers []commonfilter.Committer)
- func (b *Backend) Enqueue(chainID string, env *cb.Envelope) bool
- func (b *Backend) GetMyId() uint64
- func (b *Backend) LastBatch(chainId string) *s.Batch
- func (b *Backend) Persist(chainId string, key string, data proto.Message)
- func (b *Backend) Reconnect(chainId string, replica uint64)
- func (b *Backend) Restore(chainId string, key string, out proto.Message) bool
- func (b *Backend) Send(chainID string, msg *s.Msg, dest uint64)
- func (b *Backend) Sign(data []byte) []byte
- func (b *Backend) Timer(d time.Duration, tf func()) s.Canceller
- func (b *Backend) Unicast(chainID string, msg *s.Msg, dest uint64) error
- func (b *Backend) Validate(chainID string, req *s.Request) ([][]*s.Request, [][]filter.Committer, bool)
- type ConsensusClient
- type ConsensusServer
- type Consensus_ConsensusClient
- type Consensus_ConsensusServer
- type Executable
- type Handshake
- type PeerInfo
- type StackConfig
- type Timer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterConsensusServer ¶
func RegisterConsensusServer(s *grpc.Server, srv ConsensusServer)
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
func NewBackend ¶
func (*Backend) AddReceiver ¶
AddReceiver adds a receiver instance for a given chainId
func (*Backend) AddSbftPeer ¶
func (b *Backend) AddSbftPeer(chainID string, support multichain.ConsenterSupport, config *s.Config) (*s.SBFT, error)
AddSbftPeer adds a new SBFT peer for the given chainId using the given support and configuration
func (*Backend) Broadcast ¶
func (b *Backend) Broadcast(msg *s.MultiChainMsg) error
Unicast sends to all external SBFT peers
func (*Backend) Enqueue ¶
Enqueue enqueues an Envelope for a chainId for ordering, marshalling it first
func (*Backend) Reconnect ¶
Reconnect requests connection to a replica identified by its ID and chainId
type ConsensusClient ¶
type ConsensusClient interface {
Consensus(ctx context.Context, in *Handshake, opts ...grpc.CallOption) (Consensus_ConsensusClient, error)
}
func NewConsensusClient ¶
func NewConsensusClient(cc *grpc.ClientConn) ConsensusClient
type ConsensusServer ¶
type ConsensusServer interface {
Consensus(*Handshake, Consensus_ConsensusServer) error
}
type Consensus_ConsensusClient ¶
type Consensus_ConsensusClient interface { Recv() (*simplebft.MultiChainMsg, error) grpc.ClientStream }
type Consensus_ConsensusServer ¶
type Consensus_ConsensusServer interface { Send(*simplebft.MultiChainMsg) error grpc.ServerStream }
type Executable ¶
type Executable interface {
Execute(*Backend)
}
type Handshake ¶
type Handshake struct { }
func (*Handshake) Descriptor ¶
func (*Handshake) ProtoMessage ¶
func (*Handshake) ProtoMessage()
type StackConfig ¶
Click to show internal directories.
Click to hide internal directories.