Documentation ¶
Index ¶
- Constants
- func TemplateBatchSize(batchSize *ab.BatchSize) *cb.ConfigurationItem
- func TemplateBatchTimeout(batchTimeout string) *cb.ConfigurationItem
- func TemplateChainCreationPolicyNames(names []string) *cb.ConfigurationItem
- func TemplateConsensusType(typeValue string) *cb.ConfigurationItem
- func TemplateEgressPolicyNames(names []string) *cb.ConfigurationItem
- func TemplateIngressPolicyNames(names []string) *cb.ConfigurationItem
- func TemplateKafkaBrokers(brokers []string) *cb.ConfigurationItem
- type Manager
- type ManagerImpl
- func (pm *ManagerImpl) BatchSize() *ab.BatchSize
- func (pm *ManagerImpl) BatchTimeout() time.Duration
- func (pm *ManagerImpl) BeginConfig()
- func (pm *ManagerImpl) ChainCreationPolicyNames() []string
- func (pm *ManagerImpl) CommitConfig()
- func (pm *ManagerImpl) ConsensusType() string
- func (pm *ManagerImpl) EgressPolicyNames() []string
- func (pm *ManagerImpl) IngressPolicyNames() []string
- func (pm *ManagerImpl) KafkaBrokers() []string
- func (pm *ManagerImpl) ProposeConfig(configItem *cb.ConfigurationItem) error
- func (pm *ManagerImpl) RollbackConfig()
Constants ¶
const ( // ConsensusTypeKey is the cb.ConfigurationItem type key name for the ConsensusType message ConsensusTypeKey = "ConsensusType" // BatchSizeKey is the cb.ConfigurationItem type key name for the BatchSize message BatchSizeKey = "BatchSize" // BatchTimeoutKey is the cb.ConfigurationItem type key name for the BatchTimeout message BatchTimeoutKey = "BatchTimeout" // ChainCreationPolicyNamesKey is the cb.ConfigurationItem type key name for the ChainCreationPolicyNames message ChainCreationPolicyNamesKey = "ChainCreationPolicyNames" // KafkaBrokersKey is the cb.ConfigurationItem type key name for the KafkaBrokers message KafkaBrokersKey = "KafkaBrokers" // IngressPolicyNamesKey is the cb.ConfigurationItem type key name for the IngressPolicyNames message IngressPolicyNamesKey = "IngressPolicyNames" // EgressPolicyNamesKey is the cb.ConfigurationItem type key name for the EgressPolicyNames message EgressPolicyNamesKey = "EgressPolicyNames" )
Variables ¶
This section is empty.
Functions ¶
func TemplateBatchSize ¶
func TemplateBatchSize(batchSize *ab.BatchSize) *cb.ConfigurationItem
TemplateBatchSize creates a headerless configuration item representing the batch size
func TemplateBatchTimeout ¶
func TemplateBatchTimeout(batchTimeout string) *cb.ConfigurationItem
TemplateBatchTimeout creates a headerless configuration item representing the batch timeout
func TemplateChainCreationPolicyNames ¶
func TemplateChainCreationPolicyNames(names []string) *cb.ConfigurationItem
TemplateChainCreationPolicyNames creates a headerless configuraiton item representing the chain creation policy names
func TemplateConsensusType ¶
func TemplateConsensusType(typeValue string) *cb.ConfigurationItem
TemplateConsensusType creates a headerless configuration item representing the consensus type
func TemplateEgressPolicyNames ¶
func TemplateEgressPolicyNames(names []string) *cb.ConfigurationItem
TemplateEgressPolicyNames creates a headerless configuration item representing the egress policy names
func TemplateIngressPolicyNames ¶
func TemplateIngressPolicyNames(names []string) *cb.ConfigurationItem
TemplateIngressPolicyNames creates a headerless configuration item representing the ingress policy names
func TemplateKafkaBrokers ¶
func TemplateKafkaBrokers(brokers []string) *cb.ConfigurationItem
TemplateKafkaBrokers creates a headerless configuration item representing the kafka brokers
Types ¶
type Manager ¶
type Manager interface { // ConsensusType returns the configured consensus type ConsensusType() string // BatchSize returns the maximum number of messages to include in a block BatchSize() *ab.BatchSize // BatchTimeout returns the amount of time to wait before creating a batch BatchTimeout() time.Duration // ChainCreationPolicyNames returns the policy names which are allowed for chain creation // This field is only set for the system ordering chain ChainCreationPolicyNames() []string // KafkaBrokers returns the addresses (IP:port notation) of a set of "bootstrap" // Kafka brokers, i.e. this is not necessarily the entire set of Kafka brokers // used for ordering KafkaBrokers() []string // IngressPolicyNames returns the name of the policy to validate incoming broadcast messages against IngressPolicyNames() []string // EgressPolicyNames returns the name of the policy to validate incoming broadcast messages against EgressPolicyNames() []string }
Manager stores the common shared orderer configuration It is intended to be the primary accessor of ManagerImpl It is intended to discourage use of the other exported ManagerImpl methods which are used for updating the orderer configuration by the ConfigManager
type ManagerImpl ¶
type ManagerImpl struct {
// contains filtered or unexported fields
}
ManagerImpl is an implementation of Manager and configtx.ConfigHandler In general, it should only be referenced as an Impl for the configtx.ConfigManager
func NewManagerImpl ¶
func NewManagerImpl() *ManagerImpl
NewManagerImpl creates a new ManagerImpl with the given CryptoHelper
func (*ManagerImpl) BatchSize ¶
func (pm *ManagerImpl) BatchSize() *ab.BatchSize
BatchSize returns the maximum number of messages to include in a block
func (*ManagerImpl) BatchTimeout ¶
func (pm *ManagerImpl) BatchTimeout() time.Duration
BatchTimeout returns the amount of time to wait before creating a batch
func (*ManagerImpl) BeginConfig ¶
func (pm *ManagerImpl) BeginConfig()
BeginConfig is used to start a new configuration proposal
func (*ManagerImpl) ChainCreationPolicyNames ¶
func (pm *ManagerImpl) ChainCreationPolicyNames() []string
ChainCreationPolicyNames returns the policy names which are allowed for chain creation This field is only set for the system ordering chain
func (*ManagerImpl) CommitConfig ¶
func (pm *ManagerImpl) CommitConfig()
CommitConfig is used to commit a new configuration proposal
func (*ManagerImpl) ConsensusType ¶
func (pm *ManagerImpl) ConsensusType() string
ConsensusType returns the configured consensus type
func (*ManagerImpl) EgressPolicyNames ¶
func (pm *ManagerImpl) EgressPolicyNames() []string
EgressPolicyNames returns the name of the policy to validate incoming deliver seeks against
func (*ManagerImpl) IngressPolicyNames ¶
func (pm *ManagerImpl) IngressPolicyNames() []string
IngressPolicyNames returns the name of the policy to validate incoming broadcast messages against
func (*ManagerImpl) KafkaBrokers ¶
func (pm *ManagerImpl) KafkaBrokers() []string
KafkaBrokers returns the addresses (IP:port notation) of a set of "bootstrap" Kafka brokers, i.e. this is not necessarily the entire set of Kafka brokers used for ordering
func (*ManagerImpl) ProposeConfig ¶
func (pm *ManagerImpl) ProposeConfig(configItem *cb.ConfigurationItem) error
ProposeConfig is used to add new configuration to the configuration proposal
func (*ManagerImpl) RollbackConfig ¶
func (pm *ManagerImpl) RollbackConfig()
RollbackConfig is used to abandon a new configuration proposal