configtx

package
v1.1.0-preview Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

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

func (cm *Manager) ChainID() string

ConsensusType returns the ConsensusTypeVal

func (*Manager) ConfigEnvelope

func (cm *Manager) ConfigEnvelope() *cb.ConfigEnvelope

ConfigEnvelope returns the ConfigEnvelopeVal

func (*Manager) ProposeConfigUpdate

func (cm *Manager) ProposeConfigUpdate(update *cb.Envelope) (*cb.ConfigEnvelope, error)

ProposeConfigUpdate

func (*Manager) Sequence

func (cm *Manager) Sequence() uint64

BatchSize returns the BatchSizeVal

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

Jump to

Keyboard shortcuts

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