Documentation ¶
Index ¶
- type Config
- func (cfg *Config) Close()
- func (cfg *Config) Connect(connectTimeout time.Duration) error
- func (cfg *Config) Fetch(ctx context.Context, hash hotstuff.Hash)
- func (cfg *Config) ID() hotstuff.ID
- func (cfg *Config) Len() int
- func (cfg *Config) PrivateKey() hotstuff.PrivateKey
- func (cfg *Config) Propose(block *hotstuff.Block)
- func (cfg *Config) QuorumSize() int
- func (cfg *Config) Replica(id hotstuff.ID) (replica hotstuff.Replica, ok bool)
- func (cfg *Config) Replicas() map[hotstuff.ID]hotstuff.Replica
- type Server
- func (srv *Server) Deliver(_ context.Context, block *proto.Block)
- func (srv *Server) Fetch(ctx context.Context, pb *proto.BlockHash)
- func (srv *Server) NewView(ctx context.Context, msg *proto.NewViewMsg)
- func (srv *Server) Propose(ctx context.Context, block *proto.Block)
- func (srv *Server) Start(hs hotstuff.Consensus) error
- func (srv *Server) StartOnListener(hs hotstuff.Consensus, listener net.Listener)
- func (srv *Server) Stop()
- func (srv *Server) Vote(_ context.Context, cert *proto.PartialCert)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func NewConfig ¶
func NewConfig(replicaCfg config.ReplicaConfig) *Config
func (*Config) PrivateKey ¶
func (cfg *Config) PrivateKey() hotstuff.PrivateKey
PrivateKey returns the id of this replica
func (*Config) QuorumSize ¶
QuorumSize returns the size of a quorum
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(replicaConfig config.ReplicaConfig) *Server
func (*Server) NewView ¶
func (srv *Server) NewView(ctx context.Context, msg *proto.NewViewMsg)
NewView handles the leader's response to receiving a NewView rpc from a replica
func (*Server) StartOnListener ¶
StartOnListener starts the server on the given listener
Click to show internal directories.
Click to hide internal directories.