Versions in this module Expand all Collapse all v1 v1.4.6 May 20, 2020 Changes in this version + var AcceptRule = Rule(acceptRule{}) + var EmptyRejectRule = Rule(emptyRejectRule{}) + var ErrChannelDoesNotExist = errors.New("channel does not exist") + var ErrEmptyMessage = errors.New("Message was empty") + var ErrMaintenanceMode = errors.New("maintenance mode") + var ErrPermissionDenied = errors.New("permission denied") + type ChainCreator interface + ChannelsCount func() int + CreateBundle func(channelID string, config *cb.Config) (channelconfig.Resources, error) + NewChannelConfig func(envConfigUpdate *cb.Envelope) (channelconfig.Resources, error) + type ChannelConfigTemplator interface + NewChannelConfig func(env *cb.Envelope) (channelconfig.Resources, error) + type Classification int + const ConfigMsg + const ConfigUpdateMsg + const NormalMsg + type DefaultTemplator struct + func NewDefaultTemplator(support DefaultTemplatorSupport) *DefaultTemplator + func (dt *DefaultTemplator) NewChannelConfig(envConfigUpdate *cb.Envelope) (channelconfig.Resources, error) + type DefaultTemplatorSupport interface + ConfigtxValidator func() configtx.Validator + ConsortiumsConfig func() (channelconfig.Consortiums, bool) + OrdererConfig func() (channelconfig.Orderer, bool) + Signer func() crypto.LocalSigner + type LimitedSupport interface + OrdererConfig func() (channelconfig.Orderer, bool) + type MaintenanceFilter struct + func NewMaintenanceFilter(support MaintenanceFilterSupport) *MaintenanceFilter + func (mf *MaintenanceFilter) Apply(message *cb.Envelope) error + type MaintenanceFilterSupport interface + ChainID func() string + OrdererConfig func() (channelconfig.Orderer, bool) + type MaxBytesRule struct + func NewSizeFilter(resources SizeFilterResources) *MaxBytesRule + func (r *MaxBytesRule) Apply(message *common.Envelope) error + type Processor interface + ClassifyMsg func(chdr *cb.ChannelHeader) Classification + ProcessConfigMsg func(env *cb.Envelope) (*cb.Envelope, uint64, error) + ProcessConfigUpdateMsg func(env *cb.Envelope) (config *cb.Envelope, configSeq uint64, err error) + ProcessNormalMsg func(env *cb.Envelope) (configSeq uint64, err error) + type Rule interface + Apply func(message *ab.Envelope) error + func NewExpirationRejectRule(filterSupport resources) Rule + type RuleSet struct + func CreateStandardChannelFilters(filterSupport channelconfig.Resources, config localconfig.TopLevel) *RuleSet + func CreateSystemChannelFilters(chainCreator ChainCreator, ledgerResources channelconfig.Resources, ...) *RuleSet + func NewRuleSet(rules []Rule) *RuleSet + func (rs *RuleSet) Apply(message *ab.Envelope) error + type SigFilter struct + func NewSigFilter(normalPolicyName, maintenancePolicyName string, support SigFilterSupport) *SigFilter + func (sf *SigFilter) Apply(message *cb.Envelope) error + type SigFilterSupport interface + OrdererConfig func() (channelconfig.Orderer, bool) + PolicyManager func() policies.Manager + type SizeFilterResources interface + OrdererConfig func() (channelconfig.Orderer, bool) + type StandardChannel struct + func NewStandardChannel(support StandardChannelSupport, filters *RuleSet) *StandardChannel + func (s *StandardChannel) ClassifyMsg(chdr *cb.ChannelHeader) Classification + func (s *StandardChannel) ProcessConfigMsg(env *cb.Envelope) (config *cb.Envelope, configSeq uint64, err error) + func (s *StandardChannel) ProcessConfigUpdateMsg(env *cb.Envelope) (config *cb.Envelope, configSeq uint64, err error) + func (s *StandardChannel) ProcessNormalMsg(env *cb.Envelope) (configSeq uint64, err error) + type StandardChannelSupport interface + ChainID func() string + OrdererConfig func() (channelconfig.Orderer, bool) + ProposeConfigUpdate func(configtx *cb.Envelope) (*cb.ConfigEnvelope, error) + Sequence func() uint64 + Signer func() crypto.LocalSigner + type SystemChainFilter struct + func NewSystemChannelFilter(ls LimitedSupport, cc ChainCreator) *SystemChainFilter + func (scf *SystemChainFilter) Apply(env *cb.Envelope) error + type SystemChannel struct + func NewSystemChannel(support StandardChannelSupport, templator ChannelConfigTemplator, ...) *SystemChannel + func (s *SystemChannel) ProcessConfigMsg(env *cb.Envelope) (*cb.Envelope, uint64, error) + func (s *SystemChannel) ProcessConfigUpdateMsg(envConfigUpdate *cb.Envelope) (config *cb.Envelope, configSeq uint64, err error) + func (s *SystemChannel) ProcessNormalMsg(msg *cb.Envelope) (configSeq uint64, err error)