Documentation ¶
Index ¶
- type Peer
- func (p *Peer) APIPort() int32
- func (p *Peer) APIURL() *url.URL
- func (p *Peer) ChaincodePort() int32
- func (p *Peer) ChaincodeURL() *url.URL
- func (p *Peer) Close() error
- func (p *Peer) Connect(mspID string, identity *identity.Identity) error
- func (p *Peer) Connected() bool
- func (p *Peer) ConnectionIdentity() *identity.Identity
- func (p *Peer) ConnectionMSPID() string
- func (p *Peer) Deliver(envelope *common.Envelope, callback blocks.DeliverCallback) error
- func (p *Peer) DeliverFiltered(envelope *common.Envelope, callback blocks.DeliverFilteredCallback) error
- func (p *Peer) Host() string
- func (p *Peer) Hostname() string
- func (p *Peer) InstallChaincode(scds []byte) error
- func (p *Peer) JoinChannel(block *common.Block) error
- func (p *Peer) ListChannels() ([]string, error)
- func (p *Peer) MSPID() string
- func (p *Peer) OperationsPort() int32
- func (p *Peer) OperationsURL() *url.URL
- func (p *Peer) Organization() *organization.Organization
- func (p *Peer) Port() int32
- func (p *Peer) ProcessProposal(signedProposal *peer.SignedProposal) (*peer.ProposalResponse, error)
- func (p *Peer) Start() error
- func (p *Peer) Stop() error
- func (p *Peer) ToBytes() ([]byte, error)
- func (p *Peer) ToFile(file string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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, apiPort int32, apiURL string, chaincodePort int32, chaincodeURL string, operationsPort int32, operationsURL string) (*Peer, error)
New creates a new 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) ConnectionIdentity ¶
ConnectionIdentity returns the identity used to connect to the peer.
func (*Peer) ConnectionMSPID ¶
ConnectionMSPID returns the MSP ID used to connect to the peer.
func (*Peer) DeliverFiltered ¶
func (p *Peer) DeliverFiltered(envelope *common.Envelope, callback blocks.DeliverFilteredCallback) error
DeliverFiltered requests one or more filtered blocks from the peer.
func (*Peer) InstallChaincode ¶
InstallChaincode installs the specified chaincode package onto the peer.
func (*Peer) JoinChannel ¶
JoinChannel asks the peer to join the specified channel.
func (*Peer) ListChannels ¶
ListChannels asks the peer for the list of channels it has joined.
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.
func (*Peer) ProcessProposal ¶
func (p *Peer) ProcessProposal(signedProposal *peer.SignedProposal) (*peer.ProposalResponse, error)
ProcessProposal asks the peer to endorse the specified proposal.