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

package peer

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

Index

Package Files

peer.go peerendorser.go

func PeersToTxnProcessors Uses

func PeersToTxnProcessors(peers []fab.Peer) []fab.ProposalProcessor

PeersToTxnProcessors converts a slice of Peers to a slice of TxnProposalProcessors

type Option Uses

type Option func(*Peer) error

Option describes a functional parameter for the New constructor

func FromPeerConfig Uses

func FromPeerConfig(peerCfg *fab.NetworkPeer) Option

FromPeerConfig is a functional option for the peer.New constructor that configures a new peer from a apiconfig.NetworkPeer struct

func WithInsecure Uses

func WithInsecure() Option

WithInsecure is a functional option for the peer.New constructor that configures the peer's grpc insecure option

func WithMSPID Uses

func WithMSPID(mspID string) Option

WithMSPID is a functional option for the peer.New constructor that configures the peer's msp ID

func WithPeerProcessor Uses

func WithPeerProcessor(processor fab.ProposalProcessor) Option

WithPeerProcessor is a functional option for the peer.New constructor that configures the peer's proposal processor

func WithServerName Uses

func WithServerName(serverName string) Option

WithServerName is a functional option for the peer.New constructor that configures the peer's server name

func WithTLSCert Uses

func WithTLSCert(certificate *x509.Certificate) Option

WithTLSCert is a functional option for the peer.New constructor that configures the peer's TLS certificate

func WithURL Uses

func WithURL(url string) Option

WithURL is a functional option for the peer.New constructor that configures the peer's URL

type Peer Uses

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

Peer represents a node in the target blockchain network to which HFC sends endorsement proposals, transaction ordering or query requests.

func New Uses

func New(config fab.EndpointConfig, opts ...Option) (*Peer, error)

New Returns a new Peer instance

func (*Peer) MSPID Uses

func (p *Peer) MSPID() string

MSPID gets the Peer mspID.

func (*Peer) ProcessTransactionProposal Uses

func (p *Peer) ProcessTransactionProposal(ctx reqContext.Context, proposal fab.ProcessProposalRequest) (*fab.TransactionProposalResponse, error)

ProcessTransactionProposal sends the created proposal to peer for endorsement.

func (*Peer) String Uses

func (p *Peer) String() string

func (*Peer) URL Uses

func (p *Peer) URL() string

URL gets the Peer URL. Required property for the instance objects. It returns the address of the Peer.

Package peer imports 21 packages (graph) and is imported by 3 packages. Updated 2019-08-29. Refresh now. Tools for package owners.