sharedconfig

package
v1.0.0-preview Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2017 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL