orderer

package
v0.0.19 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 7, 2023 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

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 Connect

func Connect(orderer *Orderer, mspID string, identity *identity.Identity) (*Connection, error)

Connect opens a connection to the 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) APIHost

func (o *Orderer) APIHost(internal bool) string

APIHost returns the host (hostname:port) of the orderer.

func (*Orderer) APIHostname

func (o *Orderer) APIHostname(internal bool) string

APIHostname returns the hostname of the orderer.

func (*Orderer) APIPort

func (o *Orderer) APIPort(internal bool) int32

APIPort returns the API port of the orderer.

func (*Orderer) APIURL

func (o *Orderer) APIURL(internal bool) *url.URL

APIURL returns the API URL of the orderer.

func (*Orderer) EnableTLS

func (o *Orderer) EnableTLS(tls *identity.Identity)

EnableTLS enables TLS for this orderer.

func (*Orderer) MSPID

func (o *Orderer) MSPID() string

MSPID returns the MSP ID of the orderer.

func (*Orderer) OperationsHost

func (o *Orderer) OperationsHost(internal bool) string

OperationsHost returns the host (hostname:port) of the orderer.

func (*Orderer) OperationsHostname

func (o *Orderer) OperationsHostname(internal bool) string

OperationsHostname returns the hostname of the orderer.

func (*Orderer) OperationsPort

func (o *Orderer) OperationsPort(internal bool) int32

OperationsPort returns the operations port of the orderer.

func (*Orderer) OperationsURL

func (o *Orderer) OperationsURL(internal bool) *url.URL

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.

func (*Orderer) Stop

func (o *Orderer) Stop() error

Stop stops the orderer.

func (*Orderer) TLS

func (o *Orderer) TLS() *identity.Identity

TLS gets the TLS identity for this orderer.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL