fabric: github.com/hyperledger/fabric/common/configtx Index | Files | Directories

package configtx

import "github.com/hyperledger/fabric/common/configtx"

Index

Package Files

compare.go configmap.go configtx.go update.go util.go validator.go

func UnmarshalConfig Uses

func UnmarshalConfig(data []byte) (*cb.Config, error)

UnmarshalConfig attempts to unmarshal bytes to a *cb.Config

func UnmarshalConfigEnvelope Uses

func UnmarshalConfigEnvelope(data []byte) (*cb.ConfigEnvelope, error)

UnmarshalConfigEnvelope attempts to unmarshal bytes to a *cb.ConfigEnvelope

func UnmarshalConfigEnvelopeOrPanic Uses

func UnmarshalConfigEnvelopeOrPanic(data []byte) *cb.ConfigEnvelope

UnmarshalConfigEnvelopeOrPanic attempts to unmarshal bytes to a *cb.ConfigEnvelope or panics on error

func UnmarshalConfigOrPanic Uses

func UnmarshalConfigOrPanic(data []byte) *cb.Config

UnmarshalConfigOrPanic attempts to unmarshal bytes to a *cb.Config or panics on error

func UnmarshalConfigUpdate Uses

func UnmarshalConfigUpdate(data []byte) (*cb.ConfigUpdate, error)

UnmarshalConfigUpdate attempts to unmarshal bytes to a *cb.ConfigUpdate

func UnmarshalConfigUpdateEnvelope Uses

func UnmarshalConfigUpdateEnvelope(data []byte) (*cb.ConfigUpdateEnvelope, error)

UnmarshalConfigUpdateEnvelope attempts to unmarshal bytes to a *cb.ConfigUpdate

func UnmarshalConfigUpdateEnvelopeOrPanic Uses

func UnmarshalConfigUpdateEnvelopeOrPanic(data []byte) *cb.ConfigUpdateEnvelope

UnmarshalConfigUpdateEnvelopeOrPanic attempts to unmarshal bytes to a *cb.ConfigUpdateEnvelope or panics on error

func UnmarshalConfigUpdateFromPayload Uses

func UnmarshalConfigUpdateFromPayload(payload *cb.Payload) (*cb.ConfigUpdate, error)

UnmarshalConfigUpdateFromPayload unmarshals configuration update from given payload

func UnmarshalConfigUpdateOrPanic Uses

func UnmarshalConfigUpdateOrPanic(data []byte) *cb.ConfigUpdate

UnmarshalConfigUpdateOrPanic attempts to unmarshal bytes to a *cb.ConfigUpdate or panics on error

type Validator Uses

type Validator interface {
    // Validate attempts to apply a configtx to become the new config
    Validate(configEnv *cb.ConfigEnvelope) error

    // Validate attempts to validate a new configtx against the current config state
    ProposeConfigUpdate(configtx *cb.Envelope) (*cb.ConfigEnvelope, error)

    // ChainID retrieves the chain ID associated with this manager
    ChainID() string

    // ConfigProto returns the current config as a proto
    ConfigProto() *cb.Config

    // Sequence returns the current sequence number of the config
    Sequence() uint64
}

Validator provides a mechanism to propose config updates, see the config update results and validate the results of a config update.

type ValidatorImpl Uses

type ValidatorImpl struct {
    // contains filtered or unexported fields
}

ValidatorImpl implements the Validator interface

func NewValidatorImpl Uses

func NewValidatorImpl(channelID string, config *cb.Config, namespace string, pm policies.Manager) (*ValidatorImpl, error)

NewValidatorImpl constructs a new implementation of the Validator interface.

func (*ValidatorImpl) ChainID Uses

func (vi *ValidatorImpl) ChainID() string

ChainID retrieves the chain ID associated with this manager

func (*ValidatorImpl) ConfigProto Uses

func (vi *ValidatorImpl) ConfigProto() *cb.Config

ConfigProto returns the config proto which initialized this Validator

func (*ValidatorImpl) ProposeConfigUpdate Uses

func (vi *ValidatorImpl) ProposeConfigUpdate(configtx *cb.Envelope) (*cb.ConfigEnvelope, error)

ProposeConfigUpdate takes in an Envelope of type CONFIG_UPDATE and produces a ConfigEnvelope to be used as the Envelope Payload Data of a CONFIG message

func (*ValidatorImpl) Sequence Uses

func (vi *ValidatorImpl) Sequence() uint64

Sequence returns the sequence number of the config

func (*ValidatorImpl) Validate Uses

func (vi *ValidatorImpl) Validate(configEnv *cb.ConfigEnvelope) error

Validate simulates applying a ConfigEnvelope to become the new config

Directories

PathSynopsis
test

Package configtx imports 10 packages (graph) and is imported by 48 packages. Updated 2019-03-15. Refresh now. Tools for package owners.