Documentation
¶
Index ¶
- type Initializer
- type Manager
- func (cm *Manager) Apply(configEnv *cb.ConfigEnvelope) error
- func (cm *Manager) ChainID() string
- func (cm *Manager) ConfigEnvelope() *cb.ConfigEnvelope
- func (cm *Manager) ProposeConfigUpdate(update *cb.Envelope) (*cb.ConfigEnvelope, error)
- func (cm *Manager) Sequence() uint64
- func (cm *Manager) Validate(configEnv *cb.ConfigEnvelope) error
- type Transactional
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Initializer ¶
type Initializer struct {
// PolicyManagerVal is returned by PolicyManager
PolicyManagerVal *mockpolicies.Manager
// RootGroupKeyVal is returned by RootGroupKey
RootGroupKeyVal string
}
Initializer mocks the configtxapi.Initializer interface
func (*Initializer) PolicyManager ¶
func (i *Initializer) PolicyManager() policies.Manager
PolicyManager returns PolicyManagerVal
func (*Initializer) RootGroupKey ¶
func (i *Initializer) RootGroupKey() string
RootGroupKeyreturns RootGroupKeyVal
type Manager ¶
type Manager struct {
Initializer
// ChainIDVal is returned as the result of ChainID()
ChainIDVal string
// SequenceVal is returned as the result of Sequence()
SequenceVal uint64
// ApplyVal is returned by Apply
ApplyVal error
// AppliedConfigUpdateEnvelope is set by Apply
AppliedConfigUpdateEnvelope *cb.ConfigEnvelope
// ValidateVal is returned by Validate
ValidateVal error
// ProposeConfigUpdateError is returned as the error value for ProposeConfigUpdate
ProposeConfigUpdateError error
// ProposeConfigUpdateVal is returns as the value for ProposeConfigUpdate
ProposeConfigUpdateVal *cb.ConfigEnvelope
// ConfigEnvelopeVal is returned as the value for ConfigEnvelope()
ConfigEnvelopeVal *cb.ConfigEnvelope
}
Manager is a mock implementation of configtxapi.Manager
func (*Manager) Apply ¶
func (cm *Manager) Apply(configEnv *cb.ConfigEnvelope) error
Apply returns ApplyVal
func (*Manager) ChainID ¶
ConsensusType returns the ConsensusTypeVal
func (*Manager) ConfigEnvelope ¶
func (cm *Manager) ConfigEnvelope() *cb.ConfigEnvelope
ConfigEnvelope returns the ConfigEnvelopeVal
func (*Manager) ProposeConfigUpdate ¶
ProposeConfigUpdate
func (*Manager) Validate ¶
func (cm *Manager) Validate(configEnv *cb.ConfigEnvelope) error
Validate returns ValidateVal
type Transactional ¶
type Transactional struct{}
Transactional implements the configtxapi.Transactional
func (*Transactional) CommitProposals ¶
func (t *Transactional) CommitProposals(tx interface{})
CommitConfig does nothing
func (*Transactional) PreCommit ¶
func (t *Transactional) PreCommit(tx interface{}) error
PreCommit returns nil
func (*Transactional) RollbackProposals ¶
func (t *Transactional) RollbackProposals(tx interface{})
RollbackConfig does nothing
Source Files
¶
- configtx.go
Click to show internal directories.
Click to hide internal directories.