Documentation ¶
Index ¶
- type Connection
- func (c *Connection) Close() error
- func (c *Connection) Deliver(envelope *common.Envelope, callback blocks.DeliverCallback) error
- func (c *Connection) Identity() *identity.Identity
- func (c *Connection) InstallChaincode(pkg []byte) (string, error)
- func (c *Connection) IsConnected() bool
- func (c *Connection) JoinChannel(block *common.Block) error
- func (c *Connection) ListChannels() ([]string, error)
- func (c *Connection) MSPID() string
- func (c *Connection) ProcessProposal(signedProposal *peer.SignedProposal) (*peer.ProposalResponse, error)
- type Peer
- func (p *Peer) APIHost(internal bool) string
- func (p *Peer) APIHostname(internal bool) string
- func (p *Peer) APIPort(internal bool) int32
- func (p *Peer) APIURL(internal bool) *url.URL
- func (p *Peer) ChaincodeHost(internal bool) string
- func (p *Peer) ChaincodeHostname(internal bool) string
- func (p *Peer) ChaincodePort(internal bool) int32
- func (p *Peer) ChaincodeURL(internal bool) *url.URL
- func (p *Peer) EnableTLS(tls *identity.Identity)
- func (p *Peer) GossipHost(internal bool) string
- func (p *Peer) GossipHostname(internal bool) string
- func (p *Peer) GossipURL(internal bool) *url.URL
- func (p *Peer) MSPID() string
- func (p *Peer) OperationsHost(internal bool) string
- func (p *Peer) OperationsHostname(internal bool) string
- func (p *Peer) OperationsPort(internal bool) int32
- func (p *Peer) OperationsURL(internal bool) *url.URL
- func (p *Peer) Organization() *organization.Organization
- func (p *Peer) Start(timeout time.Duration) error
- func (p *Peer) Stop() error
- func (p *Peer) TLS() *identity.Identity
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
Connection represents a connection to a peer.
func ConnectClient ¶
func ConnectClient(peer *client.Peer, mspID string, identity *identity.Identity, tlsEnabled bool) (*Connection, error)
ConnectClient opens a connection to the peer using a client peer object.
func (*Connection) Close ¶
func (c *Connection) Close() error
Close closes the connection to the peer.
func (*Connection) Deliver ¶
func (c *Connection) Deliver(envelope *common.Envelope, callback blocks.DeliverCallback) error
Deliver requests one or more blocks from the peer.
func (*Connection) Identity ¶
func (c *Connection) Identity() *identity.Identity
Identity gets the identity used for the connection.
func (*Connection) InstallChaincode ¶
func (c *Connection) InstallChaincode(pkg []byte) (string, error)
InstallChaincode installs the specified chaincode package onto the peer.
func (*Connection) IsConnected ¶
func (c *Connection) IsConnected() bool
IsConnected returns true if the connection is open to the peer.
func (*Connection) JoinChannel ¶
func (c *Connection) JoinChannel(block *common.Block) error
JoinChannel asks the peer to join the specified channel.
func (*Connection) ListChannels ¶
func (c *Connection) ListChannels() ([]string, error)
ListChannels asks the peer for the list of channels it has joined.
func (*Connection) MSPID ¶
func (c *Connection) MSPID() string
MSPID gets the MSP ID used for the connection.
func (*Connection) ProcessProposal ¶
func (c *Connection) ProcessProposal(signedProposal *peer.SignedProposal) (*peer.ProposalResponse, error)
ProcessProposal asks the peer to endorse the specified proposal.
type Peer ¶
type Peer struct {
// contains filtered or unexported fields
}
Peer represents a loaded peer definition.
func New ¶
func New(organization *organization.Organization, directory string, microfabPort int32, apiPort int32, apiURL string, chaincodePort int32, chaincodeURL string, operationsPort int32, operationsURL string, couchDB bool, couchDBPort int32, gossipPort int32, gossipURL string) (*Peer, error)
New creates a new peer.
func (*Peer) APIHostname ¶
APIHostname returns the hostname of the peer.
func (*Peer) ChaincodeHost ¶
ChaincodeHost returns the host (hostname:port) of the peer.
func (*Peer) ChaincodeHostname ¶
ChaincodeHostname returns the hostname of the peer.
func (*Peer) ChaincodePort ¶
ChaincodePort returns the chaincode port of the peer.
func (*Peer) ChaincodeURL ¶
ChaincodeURL returns the chaincode URL of the peer.
func (*Peer) GossipHost ¶
GossipHost returns the host of the gossip connection
func (*Peer) GossipHostname ¶
GossipHostname returns just the host name used for the gossip connection
func (*Peer) OperationsHost ¶
OperationsHost returns the host (hostname:port) of the peer.
func (*Peer) OperationsHostname ¶
OperationsHostname returns the hostname of the peer.
func (*Peer) OperationsPort ¶
OperationsPort returns the operations port of the peer.
func (*Peer) OperationsURL ¶
OperationsURL returns the operations URL of the peer.
func (*Peer) Organization ¶
func (p *Peer) Organization() *organization.Organization
Organization returns the organization of the peer.