Documentation ¶
Index ¶
- Constants
- func AddOrgToChannel(sdk *fabsdk.FabricSDK, channelID string, addOrgEnvelopByte []byte, ...) error
- func CollectSign(sdk *fabsdk.FabricSDK, requiredMember []string) ([]msp.SigningIdentity, error)
- func CreatChannelTxEnvelope(applicationCapability string, channelId string, consortiumName string, ...) ([]byte, error)
- func CreateNewOrgEnvelope(origChannelGroup map[string]interface{}, ...) ([]byte, error)
- func EncodeAndReplaceNull(mapJson map[string]interface{}) *bytes.Buffer
- func GetConfigFromChannelGroup(channelGroup map[string]interface{}, mspID string) (batchTimeout string, maxMessageCount float64, preferredMaxBytes float64, ...)
- func GetLastConfigIndexFromBlock(blockBytes []byte) (uint64, error)
- func GetMetadataFromBlock(block *common.Block, index common.BlockMetadataIndex) (*common.Metadata, error)
- func PrintMSPidFromChannelGroup(channelGroup map[string]interface{})
- func QueryChannelConfigBlock(ledgerClient *ledger.Client) ([]byte, error)
- func UpdateChannel(sdk *fabsdk.FabricSDK, configuUpdateEnvelope []byte, ...) error
- func WaitUntilUpdateSucc(ledgerClient *ledger.Client, updateOptions *UpdateOptions) error
- type Channel_header
- type ConfigUpdate
- type Data
- type Header
- type Payload
- type UpdateOptions
Constants ¶
const ( REPLACE_ORDERER_ADDRESS = "replace" ADD_ORDERER_ADDRESS = "add" REMOVE_ORDERER_ADDRESS = "remove" )
Variables ¶
This section is empty.
Functions ¶
func AddOrgToChannel ¶
func AddOrgToChannel(sdk *fabsdk.FabricSDK, channelID string, addOrgEnvelopByte []byte, signIdentities []msp.SigningIdentity, ledgerClientOrg string, ordererName string) error
AddOrgToChannel submit save channel request with provided channelID, transaction envelope and required signature to orderer name
func CollectSign ¶
CollectSign collect SigningIdentity for provided members
func CreatChannelTxEnvelope ¶
func CreatChannelTxEnvelope(applicationCapability string, channelId string, consortiumName string, mspIds ...string) ([]byte, error)
CreatChannelTxEnvelope is used to build channel creation envelope
func CreateNewOrgEnvelope ¶
func CreateNewOrgEnvelope(origChannelGroup map[string]interface{}, modifiedChannelGroup map[string]interface{}, channelID string) ([]byte, error)
CreateNewOrgEnvelope used to build add new org channel update envelope
func EncodeAndReplaceNull ¶
func GetConfigFromChannelGroup ¶
func GetConfigFromChannelGroup(channelGroup map[string]interface{}, mspID string) (batchTimeout string, maxMessageCount float64, preferredMaxBytes float64, anchorPeers map[string]interface{}, orderers []string)
GetConfigFromChannelGroup will get batchTimeout/batchSize/AnchorPeers from channelGroup
func GetLastConfigIndexFromBlock ¶
GetLastConfigIndexFromBlock retrieves the index of the last config block as encoded in the block metadata
func GetMetadataFromBlock ¶
func GetMetadataFromBlock(block *common.Block, index common.BlockMetadataIndex) (*common.Metadata, error)
GetMetadataFromBlock retrieves metadata at the specified index.
func PrintMSPidFromChannelGroup ¶
func PrintMSPidFromChannelGroup(channelGroup map[string]interface{})
PrintMSPidFromChannelGroup print MSPid list in given channel group config
func QueryChannelConfigBlock ¶
QueryChannelConfig is used to query latest channel config block
func UpdateChannel ¶
func UpdateChannel(sdk *fabsdk.FabricSDK, configuUpdateEnvelope []byte, updateOptions *UpdateOptions) error
func WaitUntilUpdateSucc ¶
func WaitUntilUpdateSucc(ledgerClient *ledger.Client, updateOptions *UpdateOptions) error
Types ¶
type Channel_header ¶
type ConfigUpdate ¶
type ConfigUpdate struct {
Payload Payload
}
type Header ¶
type Header struct {
Channel_header Channel_header
}
type UpdateOptions ¶
type UpdateOptions struct { ChannelID string LedgerClientOrg string MspID string OrdererOrgUpdate bool // The config type : Orderer_Related or Peer_related OrdererAddressesUpdate bool PeerOrgUpdate bool OrdererOrgName string OrdererName string BatchTimeout string MaxMessageCount float64 PreferredMaxBytes float64 OrdererAddressesAction string OrdererAddresses []string AnchorPeers []string }
func CreateUpdateEnvelope ¶
func CreateUpdateEnvelope(updateOptions *UpdateOptions, configBlockBytes []byte) ([]byte, *UpdateOptions, error)
CreateUpdateEnvelope is used to build channel update envelope
func UpdateChannelGroup ¶
func UpdateChannelGroup(originalGroup map[string]interface{}, updateOptions *UpdateOptions) (map[string]interface{}, *UpdateOptions, error)