Documentation ¶
Index ¶
- Constants
- func ValidateBootstrapBlock(block *common.Block, bccsp bccsp.BCCSP) error
- type ChainReplicator
- type InactiveChainReplicator
- func (i *InactiveChainReplicator) Channels() []cluster.ChannelGenesisBlock
- func (i *InactiveChainReplicator) Close()
- func (i *InactiveChainReplicator) Run()
- func (i *InactiveChainReplicator) Stop()
- func (i *InactiveChainReplicator) TrackChain(chain string, genesisBlock *common.Block, createChainCallback func())
- type ReplicationInitiator
Constants ¶
View Source
const (
DefaultReplicationBackgroundRefreshInterval = time.Minute * 5
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ChainReplicator ¶
type ChainReplicator interface { // ReplicateChains replicates the given chains using the given last system channel config block. // It returns the names of the chains that were successfully replicated. ReplicateChains(lastConfigBlock *common.Block, chains []string) []string }
ChainReplicator replicates chains
type InactiveChainReplicator ¶
type InactiveChainReplicator struct {
// contains filtered or unexported fields
}
InactiveChainReplicator tracks disabled chains and replicates them upon demand
func NewInactiveChainReplicator ¶
func NewInactiveChainReplicator( chainReplicator ChainReplicator, getSysChannelConfigBlockFunc func() *common.Block, registerChainFunc func(chain string), replicationRefreshInterval time.Duration, ) *InactiveChainReplicator
func (*InactiveChainReplicator) Channels ¶
func (i *InactiveChainReplicator) Channels() []cluster.ChannelGenesisBlock
func (*InactiveChainReplicator) Close ¶
func (i *InactiveChainReplicator) Close()
func (*InactiveChainReplicator) Run ¶
func (i *InactiveChainReplicator) Run()
func (*InactiveChainReplicator) Stop ¶
func (i *InactiveChainReplicator) Stop()
Stop stops the inactive chain replicator. This is used when removing the system channel.
func (*InactiveChainReplicator) TrackChain ¶
func (i *InactiveChainReplicator) TrackChain(chain string, genesisBlock *common.Block, createChainCallback func())
TrackChain tracks a chain with the given name, and calls the given callback when this chain should be activated.
type ReplicationInitiator ¶
type ReplicationInitiator struct { RegisterChain func(chain string) ChannelLister cluster.ChannelLister // contains filtered or unexported fields }
func NewReplicationInitiator ¶
func NewReplicationInitiator( lf blockledger.Factory, bootstrapBlock *common.Block, conf *localconfig.TopLevel, secOpts comm.SecureOptions, signer identity.SignerSerializer, bccsp bccsp.BCCSP, ) *ReplicationInitiator
func (*ReplicationInitiator) ReplicateChains ¶
func (ri *ReplicationInitiator) ReplicateChains(lastConfigBlock *common.Block, chains []string) []string
ReplicateChains replicates the given chains with the assistance of the given last system channel config block, and returns the names of the chains that were successfully replicated.
func (*ReplicationInitiator) ReplicateIfNeeded ¶
func (ri *ReplicationInitiator) ReplicateIfNeeded(bootstrapBlock *common.Block)
Click to show internal directories.
Click to hide internal directories.