Documentation ¶
Index ¶
- func CheckSig(publicKey crypto.PublicKey, data []byte, sig []byte) error
- func Sign(privateKey crypto.PrivateKey, data []byte) []byte
- type Backend
- func (b *Backend) AddReceiver(chainId string, recv simplebft.Receiver)
- func (b *Backend) AddSbftPeer(chainID string, support consensus.ConsenterSupport, config *sb.Options) (*simplebft.SBFT, error)
- func (b *Backend) Broadcast(msg *sb.MultiChainMsg) error
- func (b *Backend) CheckSig(data []byte, src uint64, sig []byte) error
- func (b *Backend) Cut(chainID string) []*sb.Request
- func (b *Backend) Deliver(chainId string, batch *sb.Batch)
- func (b *Backend) Enqueue(chainID string, env *cb.Envelope) error
- func (b *Backend) GetMyId() uint64
- func (b *Backend) LastBatch(chainId string) *sb.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 *sb.Msg, dest uint64)
- func (b *Backend) Sign(data []byte) []byte
- func (b *Backend) StartAndConnectWorkers()
- func (b *Backend) Timer(d time.Duration, tf func()) simplebft.Canceller
- func (b *Backend) Unicast(chainID string, msg *sb.Msg, dest uint64) error
- func (b *Backend) Validate(chainID string, req *sb.Request) ([][]*sb.Request, bool)
- type Executable
- type PeerInfo
- type StackConfig
- type Timer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 consensus.ConsenterSupport, config *sb.Options) (*simplebft.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 *sb.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
func (*Backend) StartAndConnectWorkers ¶
func (b *Backend) StartAndConnectWorkers()
type Executable ¶
type Executable interface {
Execute(*Backend)
}
type StackConfig ¶
Click to show internal directories.
Click to hide internal directories.