github.com/lzy4123/fabric@v2.1.1+incompatible/common/configtx/configtx.go (about)

     1  /*
     2  Copyright IBM Corp. All Rights Reserved.
     3  
     4  SPDX-License-Identifier: Apache-2.0
     5  */
     6  
     7  package configtx
     8  
     9  import (
    10  	cb "github.com/hyperledger/fabric-protos-go/common"
    11  )
    12  
    13  // Validator provides a mechanism to propose config updates, see the config update results
    14  // and validate the results of a config update.
    15  type Validator interface {
    16  	// Validate attempts to apply a configtx to become the new config
    17  	Validate(configEnv *cb.ConfigEnvelope) error
    18  
    19  	// Validate attempts to validate a new configtx against the current config state
    20  	ProposeConfigUpdate(configtx *cb.Envelope) (*cb.ConfigEnvelope, error)
    21  
    22  	// ChannelID retrieves the channel ID associated with this manager
    23  	ChannelID() string
    24  
    25  	// ConfigProto returns the current config as a proto
    26  	ConfigProto() *cb.Config
    27  
    28  	// Sequence returns the current sequence number of the config
    29  	Sequence() uint64
    30  }