fabric-sdk-go: github.com/hyperledger/fabric-sdk-go/pkg/common/providers/fab Index | Files

package fab

import "github.com/hyperledger/fabric-sdk-go/pkg/common/providers/fab"

Index

Package Files

channel.go context.go eventservice.go network.go orderer.go peer.go proposer.go provider.go sender.go

Constants

const (
    // V1_1Capability indicates that Fabric 1.1 features are supported
    V1_1Capability = "V1_1"
    // V1_2Capability indicates that Fabric 1.2 features are supported
    V1_2Capability = "V1_2"
)
const EmptyTransactionID = TransactionID("")

EmptyTransactionID represents a non-existing transaction (usually due to error).

const SystemChannel = ""

SystemChannel is the Fabric channel for managaing resources.

type BalancerType Uses

type BalancerType string

BalancerType is the load-balancer type

const (
    // RoundRobin (default) chooses endorsers in a round-robin fashion
    RoundRobin BalancerType = "RoundRobin"

    // Random chooses endorsers randomly
    Random BalancerType = "Random"
)

type BlockEvent Uses

type BlockEvent struct {
    // Block is the block that was committed
    Block *cb.Block
    // SourceURL specifies the URL of the peer that produced the event
    SourceURL string
}

BlockEvent contains the data for the block event

type BlockFilter Uses

type BlockFilter func(block *cb.Block) bool

BlockFilter is a function that determines whether a Block event should be ignored

type BlockchainInfoResponse Uses

type BlockchainInfoResponse struct {
    BCI      *common.BlockchainInfo
    Endorser string
    Status   int32
}

BlockchainInfoResponse wraps blockchain info with endorser info

type CCEvent Uses

type CCEvent struct {
    // TxID is the ID of the transaction in which the event was set
    TxID string
    // ChaincodeID is the ID of the chaincode that set the event
    ChaincodeID string
    // EventName is the name of the chaincode event
    EventName string
    // Payload contains the payload of the chaincode event
    // NOTE: Payload will be nil for filtered events
    Payload []byte
    // BlockNumber contains the block number in which the
    // chaincode event was committed
    BlockNumber uint64
    // SourceURL specifies the URL of the peer that produced the event
    SourceURL string
}

CCEvent contains the data for a chaincode event

type CertKeyPair Uses

type CertKeyPair struct {
    Cert []byte
    Key  []byte
}

CertKeyPair contains the private key and certificate

type CertPool Uses

type CertPool interface {
    // Get returns the cert pool, optionally adding the provided certs
    Get() (*x509.CertPool, error)
    //Add allows adding certificates to CertPool
    //Call Get() after Add() to get the updated certpool
    Add(certs ...*x509.Certificate)
}

CertPool is a thread safe wrapper around the x509 standard library cert pool implementation.

type ChaincodeCall Uses

type ChaincodeCall struct {
    ID          string
    Collections []string
}

ChaincodeCall contains the ID of the chaincode as well as an optional set of private data collections that may be accessed by the chaincode.

type ChaincodeInvokeRequest Uses

type ChaincodeInvokeRequest struct {
    ChaincodeID  string
    TransientMap map[string][]byte
    Fcn          string
    Args         [][]byte
}

ChaincodeInvokeRequest contains the parameters for sending a transaction proposal.

type ChannelCfg Uses

type ChannelCfg interface {
    ID() string
    BlockNumber() uint64
    MSPs() []*mspCfg.MSPConfig
    AnchorPeers() []*OrgAnchorPeer
    Orderers() []string
    Versions() *Versions
    HasCapability(group ConfigGroupKey, capability string) bool
}

ChannelCfg contains channel configuration

type ChannelConfig Uses

type ChannelConfig interface {

    // Query channel configuration
    Query(reqCtx reqContext.Context) (ChannelCfg, error)

    // QueryBlock queries channel configuration block
    QueryBlock(reqCtx reqContext.Context) (*common.Block, error)
}

ChannelConfig allows for interaction with peer regarding channel configuration

type ChannelEndpointConfig Uses

type ChannelEndpointConfig struct {
    // Orderers list of ordering service nodes
    Orderers []string
    // Peers a list of peer-channels that are part of this organization
    // to get the real Peer config object, use the Name field and fetch NetworkConfig.Peers[Name]
    Peers map[string]PeerChannelConfig
    //Policies list of policies for channel
    Policies ChannelPolicies
}

ChannelEndpointConfig provides the definition of channels for the network

type ChannelMembership Uses

type ChannelMembership interface {
    // Validate if the given ID was issued by the channel's members
    Validate(serializedID []byte) error
    // Verify the given signature
    Verify(serializedID []byte, msg []byte, sig []byte) error
    //Check is given MSP is available
    ContainsMSP(msp string) bool
}

ChannelMembership helps identify a channel's members

type ChannelPeer Uses

type ChannelPeer struct {
    PeerChannelConfig
    NetworkPeer
}

ChannelPeer combines channel peer info with raw peerConfig info

type ChannelPolicies Uses

type ChannelPolicies struct {
    //Policy for querying channel block
    QueryChannelConfig QueryChannelConfigPolicy
    Discovery          DiscoveryPolicy
    Selection          SelectionPolicy
    EventService       EventServicePolicy
}

ChannelPolicies defines list of policies defined for a channel

type ChannelProvider Uses

type ChannelProvider interface {
    ChannelService(ctx ClientContext, channelID string) (ChannelService, error)
}

ChannelProvider supplies Channel related-objects for the named channel.

type ChannelService Uses

type ChannelService interface {
    Config() (ChannelConfig, error)
    EventService(opts ...options.Opt) (EventService, error)
    Membership() (ChannelMembership, error)
    ChannelConfig() (ChannelCfg, error)
    Transactor(reqCtx reqContext.Context) (Transactor, error)
    Discovery() (DiscoveryService, error)
    Selection() (SelectionService, error)
}

ChannelService supplies services related to a channel.

type ClientContext Uses

type ClientContext interface {
    core.Providers
    msp.Providers
    Providers
    msp.SigningIdentity
}

ClientContext contains the client context

type CommManager Uses

type CommManager interface {
    DialContext(ctx reqContext.Context, target string, opts ...grpc.DialOption) (*grpc.ClientConn, error)
    ReleaseConn(conn *grpc.ClientConn)
}

CommManager enables network communication.

type ConfigGroupKey Uses

type ConfigGroupKey string

ConfigGroupKey is the config group key

const (
    // ChannelGroupKey is the Channel config group key
    ChannelGroupKey ConfigGroupKey = ""
    // OrdererGroupKey is the Orderer config group key
    OrdererGroupKey ConfigGroupKey = "Orderer"
    // ApplicationGroupKey is the Application config group key
    ApplicationGroupKey ConfigGroupKey = "Application"
)

type ConnectionEvent Uses

type ConnectionEvent struct {
    Connected bool
    Err       error
}

ConnectionEvent is sent when the client disconnects from or reconnects to the event server. Connected == true means that the client has connected, whereas Connected == false means that the client has disconnected. In the disconnected case, Err contains the disconnect error.

type DiscoveryPolicy Uses

type DiscoveryPolicy struct {
    MinResponses int
    MaxTargets   int
    RetryOpts    retry.Opts
}

DiscoveryPolicy defines policy for discovery

type DiscoveryService Uses

type DiscoveryService interface {
    GetPeers() ([]Peer, error)
}

DiscoveryService is used to discover eligible peers on specific channel

type EnabledDisabled Uses

type EnabledDisabled string

EnabledDisabled specifies whether or not a feature is enabled

const (
    // Enabled indicates that the feature is enabled.
    Enabled EnabledDisabled = "Enabled"

    // Disabled indicates that the feature is disabled.
    Disabled EnabledDisabled = "Disabled"
)

type EndpointConfig Uses

type EndpointConfig interface {
    Timeout(TimeoutType) time.Duration
    OrderersConfig() []OrdererConfig
    OrdererConfig(nameOrURL string) (*OrdererConfig, bool)
    PeersConfig(org string) ([]PeerConfig, bool)
    PeerConfig(nameOrURL string) (*PeerConfig, bool)
    NetworkConfig() *NetworkConfig
    NetworkPeers() []NetworkPeer
    ChannelConfig(name string) *ChannelEndpointConfig
    ChannelPeers(name string) []ChannelPeer
    ChannelOrderers(name string) []OrdererConfig
    TLSCACertPool() CertPool
    TLSClientCerts() []tls.Certificate
    CryptoConfigPath() string
}

EndpointConfig contains endpoint network configurations

type ErrorHandler Uses

type ErrorHandler func(ctxt ClientContext, channelID string, err error)

ErrorHandler is invoked when an error occurs in one of the services

type EventClient Uses

type EventClient interface {
    EventService

    // Connect connects to the event server.
    Connect() error

    // Close closes the connection to the event server and releases all resources.
    // Once this function is invoked the client may no longer be used.
    Close()

    // CloseIfIdle closes the connection to the event server only if there are no outstanding
    // registrations.
    // Returns true if the client was closed. In this case the client may no longer be used.
    // A return value of false indicates that the client could not be closed since
    // there was at least one registration.
    CloseIfIdle() bool

    // TransferRegistrations transfers all registrations into an EventSnapshot.
    // The registrations are not closed and may be transferred to a new event client.
    // - close: If true then the client will also be closed
    TransferRegistrations(close bool) (EventSnapshot, error)
}

EventClient is a client that connects to a peer and receives channel events such as block, filtered block, chaincode, and transaction status events.

type EventService Uses

type EventService interface {
    // RegisterBlockEvent registers for block events. If the caller does not have permission
    // to register for block events then an error is returned.
    // Note that Unregister must be called when the registration is no longer needed.
    // - filter is an optional filter that filters out unwanted events. (Note: Only one filter may be specified.)
    // - Returns the registration and a channel that is used to receive events. The channel
    //   is closed when Unregister is called.
    RegisterBlockEvent(filter ...BlockFilter) (Registration, <-chan *BlockEvent, error)

    // RegisterFilteredBlockEvent registers for filtered block events.
    // Note that Unregister must be called when the registration is no longer needed.
    // - Returns the registration and a channel that is used to receive events. The channel
    //   is closed when Unregister is called.
    RegisterFilteredBlockEvent() (Registration, <-chan *FilteredBlockEvent, error)

    // RegisterChaincodeEvent registers for chaincode events.
    // Note that Unregister must be called when the registration is no longer needed.
    // - ccID is the chaincode ID for which events are to be received
    // - eventFilter is the chaincode event filter (regular expression) for which events are to be received
    // - Returns the registration and a channel that is used to receive events. The channel
    //   is closed when Unregister is called.
    RegisterChaincodeEvent(ccID, eventFilter string) (Registration, <-chan *CCEvent, error)

    // RegisterTxStatusEvent registers for transaction status events.
    // Note that Unregister must be called when the registration is no longer needed.
    // - txID is the transaction ID for which events are to be received
    // - Returns the registration and a channel that is used to receive events. The channel
    //   is closed when Unregister is called.
    RegisterTxStatusEvent(txID string) (Registration, <-chan *TxStatusEvent, error)

    // Unregister removes the given registration and closes the event channel.
    // - reg is the registration handle that was returned from one of the Register functions
    Unregister(reg Registration)
}

EventService is a service that receives events such as block, filtered block, chaincode, and transaction status events.

type EventServicePolicy Uses

type EventServicePolicy struct {
    // ResolverStrategy returns the peer resolver strategy to use when connecting to a peer
    // Default: MinBlockHeightPeerResolver
    ResolverStrategy ResolverStrategy

    // Balancer is the balancer to use when choosing a peer to connect to
    Balancer BalancerType

    // MinBlockHeightResolverMode specifies the behaviour of the MinBlockHeight resolver. Note that this
    // parameter is used when ResolverStrategy is either MinBlockHeightStrategy or PreferOrgStrategy.
    // ResolveByThreshold (default): resolves to peers based on block height lag threshold, as specified by BlockHeightLagThreshold.
    // MinBlockHeightResolverMode: then only the peers with the latest block heights are chosen.
    MinBlockHeightResolverMode MinBlockHeightResolverMode

    // BlockHeightLagThreshold returns the block height lag threshold. This value is used for choosing a peer
    // to connect to. If a peer is lagging behind the most up-to-date peer by more than the given number of
    // blocks then it will be excluded from selection.
    BlockHeightLagThreshold int

    // PeerMonitor indicates whether or not to enable the peer monitor.
    PeerMonitor EnabledDisabled

    // ReconnectBlockHeightLagThreshold - if >0 then the event client will disconnect from the peer if the peer's
    // block height falls behind the specified number of blocks and will reconnect to a better performing peer.
    // If set to 0 (default) then the peer will not disconnect based on block height.
    // NOTE: Setting this value too low may cause the event client to disconnect/reconnect too frequently, thereby
    // affecting performance.
    ReconnectBlockHeightLagThreshold int

    // PeerMonitorPeriod is the period in which the connected peer is monitored to see if
    // the event client should disconnect from it and reconnect to another peer.
    // If set to 0 then the peer will not be monitored and will not be disconnected.
    PeerMonitorPeriod time.Duration
}

EventServicePolicy specifies the policy for the event service

type EventSnapshot Uses

type EventSnapshot interface {
    // LastBlockReceived returns the block number of the last block received at the time
    // that the snapshot was taken.
    LastBlockReceived() uint64

    // BlockRegistrations returns the block registrations.
    BlockRegistrations() []Registration

    // FilteredBlockRegistrations returns the filtered block registrations.
    FilteredBlockRegistrations() []Registration

    // CCRegistrations returns the chaincode registrations.
    CCRegistrations() []Registration

    // TxStatusRegistrations returns the transaction status registrations.
    TxStatusRegistrations() []Registration

    // Closes all registrations
    Close()
}

EventSnapshot contains a snapshot of the event client before it was stopped. The snapshot includes all of the event registrations and the last block received.

type FilteredBlockEvent Uses

type FilteredBlockEvent struct {
    // FilteredBlock contains a filtered version of the block that was committed
    FilteredBlock *pb.FilteredBlock
    // SourceURL specifies the URL of the peer that produced the event
    SourceURL string
}

FilteredBlockEvent contains the data for a filtered block event

type InfraProvider Uses

type InfraProvider interface {
    CreatePeerFromConfig(peerCfg *NetworkPeer) (Peer, error)
    CreateOrdererFromConfig(cfg *OrdererConfig) (Orderer, error)
    CommManager() CommManager
    Close()
}

InfraProvider enables access to fabric objects such as peer and user based on config or

type LocalDiscoveryProvider Uses

type LocalDiscoveryProvider interface {
    CreateLocalDiscoveryService(mspID string) (DiscoveryService, error)
}

LocalDiscoveryProvider is used to discover peers in the local MSP

type MetricsProvider Uses

type MetricsProvider interface {
    GetMetrics() *metrics.ClientMetrics
}

MetricsProvider represents a provider of metrics.

type MinBlockHeightResolverMode Uses

type MinBlockHeightResolverMode string

MinBlockHeightResolverMode specifies the behaviour of the MinBlockHeight resolver strategy.

const (
    // ResolveByThreshold resolves to peers based on block height lag threshold.
    ResolveByThreshold MinBlockHeightResolverMode = "ResolveByThreshold"

    // ResolveLatest resolves to peers with the most up-to-date block height
    ResolveLatest MinBlockHeightResolverMode = "ResolveLatest"
)

type NetworkConfig Uses

type NetworkConfig struct {
    Channels      map[string]ChannelEndpointConfig
    Organizations map[string]OrganizationConfig
    Orderers      map[string]OrdererConfig
    Peers         map[string]PeerConfig
}

NetworkConfig provides a static definition of endpoint configuration network

type NetworkPeer Uses

type NetworkPeer struct {
    PeerConfig
    MSPID string
}

NetworkPeer combines peer info with MSP info

type Orderer Uses

type Orderer interface {
    URL() string
    SendBroadcast(ctx reqContext.Context, envelope *SignedEnvelope) (*common.Status, error)
    SendDeliver(ctx reqContext.Context, envelope *SignedEnvelope) (chan *common.Block, chan error)
}

Orderer The Orderer class represents a peer in the target blockchain network to which HFC sends a block of transactions of endorsed proposals requiring ordering.

type OrdererConfig Uses

type OrdererConfig struct {
    URL         string
    GRPCOptions map[string]interface{}
    TLSCACert   *x509.Certificate
}

OrdererConfig defines an orderer configuration

type OrgAnchorPeer Uses

type OrgAnchorPeer struct {
    Org  string
    Host string
    Port int32
}

OrgAnchorPeer contains information about an anchor peer on this channel

type OrganizationConfig Uses

type OrganizationConfig struct {
    MSPID                  string
    CryptoPath             string
    Users                  map[string]CertKeyPair
    Peers                  []string
    CertificateAuthorities []string
}

OrganizationConfig provides the definition of an organization in the network

type Peer Uses

type Peer interface {
    ProposalProcessor
    // MSPID gets the Peer mspID.
    MSPID() string

    //URL gets the peer address
    URL() string
}

The Peer class represents a peer in the target blockchain network to which HFC sends endorsement proposals or query requests.

type PeerChannelConfig Uses

type PeerChannelConfig struct {
    EndorsingPeer  bool
    ChaincodeQuery bool
    LedgerQuery    bool
    EventSource    bool
}

PeerChannelConfig defines the peer capabilities

type PeerConfig Uses

type PeerConfig struct {
    URL         string
    GRPCOptions map[string]interface{}
    TLSCACert   *x509.Certificate
}

PeerConfig defines a peer configuration

type PeerState Uses

type PeerState interface {
    BlockHeight() uint64
}

PeerState provides state information about the Peer

type PrioritySelector Uses

type PrioritySelector interface {
    // A positive return value means peer1 is selected
    // A negative return value means the peer2 is selected
    // Zero return value means their priorities are the same
    Compare(peer1, peer2 Peer) int
}

PrioritySelector determines how likely a peer is to be selected over another peer

type ProcessProposalRequest Uses

type ProcessProposalRequest struct {
    SignedProposal *pb.SignedProposal
}

ProcessProposalRequest requests simulation of a proposed transaction from transaction processors.

type ProposalProcessor Uses

type ProposalProcessor interface {
    ProcessTransactionProposal(reqContext.Context, ProcessProposalRequest) (*TransactionProposalResponse, error)
}

ProposalProcessor simulates transaction proposal, so that a client can submit the result for ordering.

type ProposalSender Uses

type ProposalSender interface {
    CreateTransactionHeader(opts ...TxnHeaderOpt) (TransactionHeader, error)
    SendTransactionProposal(*TransactionProposal, []ProposalProcessor) ([]*TransactionProposalResponse, error)
}

ProposalSender provides the ability for a transaction proposal to be created and sent.

type Providers Uses

type Providers interface {
    LocalDiscoveryProvider() LocalDiscoveryProvider
    ChannelProvider() ChannelProvider
    InfraProvider() InfraProvider
    EndpointConfig() EndpointConfig
    MetricsProvider
}

Providers represents the SDK configured service providers context.

type QueryChannelConfigPolicy Uses

type QueryChannelConfigPolicy struct {
    MinResponses int
    MaxTargets   int
    RetryOpts    retry.Opts
}

QueryChannelConfigPolicy defines policy for channelConfigBlock

type Registration Uses

type Registration interface{}

Registration is a handle that is returned from a successful RegisterXXXEvent. This handle should be used in Unregister in order to unregister the event.

type ResolverStrategy Uses

type ResolverStrategy string

ResolverStrategy is the peer resolver type

const (
    // BalancedStrategy is a peer resolver strategy that chooses peers based on a configured load balancer
    BalancedStrategy ResolverStrategy = "Balanced"

    // MinBlockHeightStrategy is a peer resolver strategy that chooses the best peer according to a block height lag threshold.
    // The maximum block height of all peers is determined and the peers whose block heights are under the maximum height but above
    // a provided "lag" threshold are load balanced. The other peers are not considered.
    MinBlockHeightStrategy ResolverStrategy = "MinBlockHeight"

    // PreferOrgStrategy is a peer resolver strategy that determines which peers are suitable based on block height lag threshold,
    // although will prefer the peers in the current org (as long as their block height is above a configured threshold).
    // If none of the peers from the current org are suitable then a peer from another org is chosen.
    PreferOrgStrategy ResolverStrategy = "PreferOrg"
)

type SelectionPolicy Uses

type SelectionPolicy struct {
    // SortingStrategy is the endorser sorting strategy to use
    SortingStrategy SelectionSortingStrategy

    // BalancerType is the balancer to use in order to load-balance calls to endorsers
    Balancer BalancerType

    // BlockHeightLagThreshold is the number of blocks from the highest block number of a group of peers
    // that a peer can lag behind and still be considered to be up-to-date. These peers will be sorted
    // using the given Balancer. If a peer's block height falls behind this threshold then it will be
    // demoted to a lower priority list of peers which will be sorted according to block height.
    // Note: This property only applies to BlockHeightPriority sorter
    BlockHeightLagThreshold int
}

SelectionPolicy defines policy for selection

type SelectionService Uses

type SelectionService interface {
    // GetEndorsersForChaincode returns a set of peers that should satisfy the endorsement
    // policies of all of the given chaincodes.
    // A set of options may be provided to the selection service. Note that the type of options
    // may vary depending on the specific selection service implementation.
    GetEndorsersForChaincode(chaincodes []*ChaincodeCall, opts ...options.Opt) ([]Peer, error)
}

SelectionService selects peers for endorsement and commit events

type SelectionSortingStrategy Uses

type SelectionSortingStrategy string

SelectionSortingStrategy is the endorser selection sorting strategy

const (
    // BlockHeightPriority (default) is a load-balancing selection sorting strategy
    // which also prioritizes peers at a block height that is above a certain "lag" threshold.
    BlockHeightPriority SelectionSortingStrategy = "BlockHeightPriority"

    // Balanced is a load-balancing selection sorting strategy
    Balanced SelectionSortingStrategy = "Balanced"
)

type Sender Uses

type Sender interface {
    CreateTransaction(request TransactionRequest) (*Transaction, error)
    SendTransaction(tx *Transaction) (*TransactionResponse, error)
}

Sender provides the ability for a transaction to be created and sent.

TODO: CreateTransaction should be refactored as it is actually a factory method.

type SignedEnvelope Uses

type SignedEnvelope struct {
    Payload   []byte
    Signature []byte
}

A SignedEnvelope can can be sent to an orderer for broadcasting

type TargetFilter Uses

type TargetFilter interface {
    // Accept returns true if peer should be included in the list of target peers
    Accept(peer Peer) bool
}

TargetFilter allows for filtering target peers

type TargetSorter Uses

type TargetSorter interface {
    // Returns the sorted peers
    Sort(peers []Peer) []Peer
}

TargetSorter allows for sorting target peers

type TimeoutType Uses

type TimeoutType int

TimeoutType enumerates the different types of outgoing connections

const (
    // PeerConnection connection timeout
    PeerConnection TimeoutType = iota
    // EventReg connection timeout
    EventReg
    // Query timeout
    Query
    // Execute timeout
    Execute
    // OrdererConnection orderer connection timeout
    OrdererConnection
    // OrdererResponse orderer response timeout
    OrdererResponse
    // DiscoveryGreylistExpiry discovery Greylist expiration period
    DiscoveryGreylistExpiry
    // ConnectionIdle is the timeout for closing idle connections
    ConnectionIdle
    // CacheSweepInterval is the duration between cache sweeps
    CacheSweepInterval
    // EventServiceIdle is the timeout for closing the event service connection
    EventServiceIdle
    // PeerResponse peer response timeout
    PeerResponse
    // ResMgmt timeout is default overall timeout for all resource management operations
    ResMgmt
    // ChannelConfigRefresh channel configuration refresh interval
    ChannelConfigRefresh
    // ChannelMembershipRefresh channel membership refresh interval
    ChannelMembershipRefresh
    // DiscoveryConnection discovery connection timeout
    DiscoveryConnection
    // DiscoveryResponse discovery response timeout
    DiscoveryResponse
    // DiscoveryServiceRefresh discovery service refresh interval
    DiscoveryServiceRefresh
    // SelectionServiceRefresh selection service refresh interval
    SelectionServiceRefresh
)

type Transaction Uses

type Transaction struct {
    Proposal    *TransactionProposal
    Transaction *pb.Transaction
}

The Transaction object created from an endorsed proposal.

type TransactionHeader Uses

type TransactionHeader interface {
    TransactionID() TransactionID
    Creator() []byte
    Nonce() []byte
    ChannelID() string
}

TransactionHeader provides a handle to transaction metadata.

type TransactionID Uses

type TransactionID string

TransactionID provides the identifier of a Fabric transaction proposal.

type TransactionProposal Uses

type TransactionProposal struct {
    TxnID TransactionID
    *pb.Proposal
}

TransactionProposal contains a marashalled transaction proposal.

type TransactionProposalResponse Uses

type TransactionProposalResponse struct {
    Endorser string
    // Status is the EndorserStatus
    Status int32
    // ChaincodeStatus is the status returned by Chaincode
    ChaincodeStatus int32
    *pb.ProposalResponse
}

TransactionProposalResponse respresents the result of transaction proposal processing.

type TransactionRequest Uses

type TransactionRequest struct {
    Proposal          *TransactionProposal
    ProposalResponses []*TransactionProposalResponse
}

TransactionRequest holds endorsed Transaction Proposals.

type TransactionResponse Uses

type TransactionResponse struct {
    Orderer string
}

TransactionResponse contains information returned by the orderer.

type Transactor Uses

type Transactor interface {
    Sender
    ProposalSender
}

Transactor supplies methods for sending transaction proposals and transactions.

type TxStatusEvent Uses

type TxStatusEvent struct {
    // TxID is the ID of the transaction in which the event was set
    TxID string
    // TxValidationCode is the status code of the commit
    TxValidationCode pb.TxValidationCode
    // BlockNumber contains the block number in which the
    // transaction was committed
    BlockNumber uint64
    // SourceURL specifies the URL of the peer that produced the event
    SourceURL string
}

TxStatusEvent contains the data for a transaction status event

type TxnHeaderOpt Uses

type TxnHeaderOpt func(*TxnHeaderOptions)

TxnHeaderOpt is a Transaction Header option

func WithCreator Uses

func WithCreator(creator []byte) TxnHeaderOpt

WithCreator specifies the creator to use when creating the Transaction Header

func WithNonce Uses

func WithNonce(nonce []byte) TxnHeaderOpt

WithNonce specifies the nonce to use when creating the Transaction Header

type TxnHeaderOptions Uses

type TxnHeaderOptions struct {
    Nonce   []byte
    Creator []byte
}

TxnHeaderOptions contains options for creating a Transaction Header

type Versions Uses

type Versions struct {
    ReadSet  *common.ConfigGroup
    WriteSet *common.ConfigGroup
    Channel  *common.ConfigGroup
}

Versions ...

Package fab imports 13 packages (graph) and is imported by 76 packages. Updated 2019-08-25. Refresh now. Tools for package owners.