Documentation ¶
Overview ¶
Package multichannel tracks the channel resources for the orderer. It initially loads the set of existing channels, and provides an interface for users of these channels to retrieve them, or create new ones.
Index ¶
- type ChainSupport
- func (cs *ChainSupport) BlockCutter() blockcutter.Receiver
- func (cs *ChainSupport) Configure(configUpdate *cb.Envelope, config *cb.Envelope, configSeq uint64) error
- func (cs *ChainSupport) CreateNextBlock(messages []*cb.Envelope) *cb.Block
- func (cs *ChainSupport) Errored() <-chan struct{}
- func (cs *ChainSupport) Height() uint64
- func (cs *ChainSupport) NewSignatureHeader() (*cb.SignatureHeader, error)
- func (cs *ChainSupport) Order(env *cb.Envelope, configSeq uint64) error
- func (cs *ChainSupport) Reader() ledger.Reader
- func (cs *ChainSupport) Sign(message []byte) ([]byte, error)
- func (cs *ChainSupport) Signer() crypto.LocalSigner
- func (cs *ChainSupport) WriteBlock(block *cb.Block, encodedMetadataValue []byte) *cb.Block
- func (cs *ChainSupport) WriteConfigBlock(block *cb.Block, encodedMetadataValue []byte) *cb.Block
- type Registrar
- func (r *Registrar) BroadcastChannelSupport(msg *cb.Envelope) (*cb.ChannelHeader, bool, *ChainSupport, error)
- func (r *Registrar) ChannelsCount() int
- func (r *Registrar) GetChain(chainID string) (*ChainSupport, bool)
- func (r *Registrar) NewChannelConfig(envConfigUpdate *cb.Envelope) (configtxapi.Manager, error)
- func (r *Registrar) SystemChannelID() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChainSupport ¶
type ChainSupport struct { msgprocessor.Processor // contains filtered or unexported fields }
ChainSupport holds the resources for a particular channel.
func (*ChainSupport) BlockCutter ¶
func (cs *ChainSupport) BlockCutter() blockcutter.Receiver
BlockCutter returns the blockcutter.Receiver instance for this channel.
func (*ChainSupport) Configure ¶
func (cs *ChainSupport) Configure(configUpdate *cb.Envelope, config *cb.Envelope, configSeq uint64) error
Configure passes through to the Consenter implementation.
func (*ChainSupport) CreateNextBlock ¶
func (cs *ChainSupport) CreateNextBlock(messages []*cb.Envelope) *cb.Block
CreateNextBlock creates a new block with the next block number, and the given contents.
func (*ChainSupport) Errored ¶
func (cs *ChainSupport) Errored() <-chan struct{}
Errored returns whether the backing consenter has errored
func (*ChainSupport) Height ¶
func (cs *ChainSupport) Height() uint64
Height passes through to the underlying ledger's Height.
func (*ChainSupport) NewSignatureHeader ¶
func (cs *ChainSupport) NewSignatureHeader() (*cb.SignatureHeader, error)
NewSignatureHeader passes through to the signer NewSignatureHeader method.
func (*ChainSupport) Order ¶
func (cs *ChainSupport) Order(env *cb.Envelope, configSeq uint64) error
Order passes through to the Consenter implementation.
func (*ChainSupport) Reader ¶
func (cs *ChainSupport) Reader() ledger.Reader
Reader returns a reader for the underlying ledger.
func (*ChainSupport) Sign ¶
func (cs *ChainSupport) Sign(message []byte) ([]byte, error)
Sign passes through to the signer Sign method.
func (*ChainSupport) Signer ¶
func (cs *ChainSupport) Signer() crypto.LocalSigner
Signer returns the crypto.Localsigner for this channel.
func (*ChainSupport) WriteBlock ¶
WriteBlock should be invoked for blocks which contain normal transactions.
func (*ChainSupport) WriteConfigBlock ¶
WriteConfigBlock should be invoked for blocks which contain a config transaction.
type Registrar ¶
type Registrar struct {
// contains filtered or unexported fields
}
Registrar serves as a point of access and control for the individual channel resources.
func NewRegistrar ¶
func NewRegistrar(ledgerFactory ledger.Factory, consenters map[string]consensus.Consenter, signer crypto.LocalSigner) *Registrar
NewRegistrar produces an instance of a *Registrar.
func (*Registrar) BroadcastChannelSupport ¶
func (r *Registrar) BroadcastChannelSupport(msg *cb.Envelope) (*cb.ChannelHeader, bool, *ChainSupport, error)
BroadcastChannelSupport returns the message channel header, whether the message is a config update and the channel resources for a message or an error if the message is not a message which can be processed directly (like CONFIG and ORDERER_TRANSACTION messages)
func (*Registrar) ChannelsCount ¶
ChannelsCount returns the count of the current total number of channels.
func (*Registrar) GetChain ¶
func (r *Registrar) GetChain(chainID string) (*ChainSupport, bool)
GetChain retrieves the chain support for a chain (and whether it exists)
func (*Registrar) NewChannelConfig ¶
NewChannelConfig produces a new template channel configuration based on the system channel's current config.
func (*Registrar) SystemChannelID ¶
SystemChannelID returns the ChannelID for the system channel.