Documentation ¶
Index ¶
- type Chain
- func (c *Chain) Configure(env *common.Envelope, configSeq uint64) error
- func (c *Chain) Errored() <-chan struct{}
- func (c *Chain) Halt()
- func (c *Chain) Order(env *common.Envelope, configSeq uint64) error
- func (c *Chain) Start()
- func (c *Chain) Submit(req *orderer.SubmitRequest, sender uint64) error
- func (c *Chain) WaitReady() error
- type Dispatcher
- type MessageReceiver
- type Options
- type ReceiverGetter
- type Storage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chain ¶
type Chain struct {
// contains filtered or unexported fields
}
Chain implements consensus.Chain interface.
func NewChain ¶
func NewChain(support consensus.ConsenterSupport, opts Options, observe chan<- uint64) (*Chain, error)
NewChain returns a new chain.
func (*Chain) Errored ¶
func (c *Chain) Errored() <-chan struct{}
Errored returns a channel that closes when the chain stops.
func (*Chain) Start ¶
func (c *Chain) Start()
Start instructs the orderer to begin serving the chain and keep it current.
type Dispatcher ¶
type Dispatcher struct { Logger *flogging.FabricLogger ChainSelector ReceiverGetter }
Dispatcher dispatches Submit and Step requests to the designated per chain instances
func (*Dispatcher) OnStep ¶
func (d *Dispatcher) OnStep(channel string, sender uint64, request *orderer.StepRequest) (*orderer.StepResponse, error)
OnStep notifies the Dispatcher for a reception of a StepRequest from a given sender on a given channel
func (*Dispatcher) OnSubmit ¶
func (d *Dispatcher) OnSubmit(channel string, sender uint64, request *orderer.SubmitRequest) (*orderer.SubmitResponse, error)
OnSubmit notifies the Dispatcher for a reception of a SubmitRequest from a given sender on a given channel
type MessageReceiver ¶
type MessageReceiver interface { // Step passes the given StepRequest message to the MessageReceiver Step(req *orderer.StepRequest, sender uint64) error // Submit passes the given SubmitRequest message to the MessageReceiver Submit(req *orderer.SubmitRequest, sender uint64) error }
MessageReceiver receives messages
type Options ¶
type Options struct { RaftID uint64 Clock clock.Clock Storage Storage Logger *flogging.FabricLogger TickInterval time.Duration ElectionTick int HeartbeatTick int MaxSizePerMsg uint64 MaxInflightMsgs int Peers []raft.Peer }
Options contains all the configurations relevant to the chain.
type ReceiverGetter ¶
type ReceiverGetter interface { // ReceiverByChain returns the MessageReceiver if it exists, or nil if it doesn't ReceiverByChain(channelID string) MessageReceiver }
ReceiverGetter obtains instances of MessageReceiver given a channel ID