Documentation ¶
Index ¶
- type Connection
- func (c *Connection) Broadcast(envelope *common.Envelope) error
- 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) IsConnected() bool
- func (c *Connection) MSPID() string
- type Orderer
- func (o *Orderer) APIHost(internal bool) string
- func (o *Orderer) APIHostname(internal bool) string
- func (o *Orderer) APIPort(internal bool) int32
- func (o *Orderer) APIURL(internal bool) *url.URL
- func (o *Orderer) EnableTLS(tls *identity.Identity)
- func (o *Orderer) MSPID() string
- func (o *Orderer) OperationsHost(internal bool) string
- func (o *Orderer) OperationsHostname(internal bool) string
- func (o *Orderer) OperationsPort(internal bool) int32
- func (o *Orderer) OperationsURL(internal bool) *url.URL
- func (o *Orderer) Organization() *organization.Organization
- func (o *Orderer) Start(consortium []*organization.Organization, timeout time.Duration) error
- func (o *Orderer) Stop() error
- func (o *Orderer) 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 orderer.
func ConnectClient ¶
func ConnectClient(orderer *client.OrderingService, mspID string, identity *identity.Identity, tlsEnabled bool) (*Connection, error)
ConnectClient opens a connection to the orderer using a client orderer object.
func (*Connection) Broadcast ¶
func (c *Connection) Broadcast(envelope *common.Envelope) error
Broadcast sends an envelope with one or more transactions in to the orderer.
func (*Connection) Close ¶
func (c *Connection) Close() error
Close closes the connection to the orderer.
func (*Connection) Deliver ¶
func (c *Connection) Deliver(envelope *common.Envelope, callback blocks.DeliverCallback) error
Deliver requests one or more blocks from the orderer.
func (*Connection) Identity ¶
func (c *Connection) Identity() *identity.Identity
Identity gets the identity used for the connection.
func (*Connection) IsConnected ¶
func (c *Connection) IsConnected() bool
IsConnected returns true if the connection is open to the orderer.
func (*Connection) MSPID ¶
func (c *Connection) MSPID() string
MSPID gets the MSP ID used for the connection.
type Orderer ¶
type Orderer struct {
// contains filtered or unexported fields
}
Orderer represents a loaded orderer definition.
func New ¶
func New(organization *organization.Organization, directory string, microFabPort int32, apiPort int32, apiURL string, operationsPort int32, operationsURL string) (*Orderer, error)
New creates a new orderer.
func (*Orderer) APIHostname ¶
APIHostname returns the hostname of the orderer.
func (*Orderer) OperationsHost ¶
OperationsHost returns the host (hostname:port) of the orderer.
func (*Orderer) OperationsHostname ¶
OperationsHostname returns the hostname of the orderer.
func (*Orderer) OperationsPort ¶
OperationsPort returns the operations port of the orderer.
func (*Orderer) OperationsURL ¶
OperationsURL returns the operations URL of the orderer.
func (*Orderer) Organization ¶
func (o *Orderer) Organization() *organization.Organization
Organization returns the organization of the orderer.
func (*Orderer) Start ¶
func (o *Orderer) Start(consortium []*organization.Organization, timeout time.Duration) error
Start starts the orderer.