orderer

package
v0.0.0-...-85e540a Latest Latest
Warning

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

Go to latest
Published: May 6, 2020 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Orderer

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

Orderer represents a loaded orderer definition.

func FromBytes

func FromBytes(data []byte) (*Orderer, error)

FromBytes creates a new connection to an orderer from JSON data.

func FromFile

func FromFile(file string) (*Orderer, error)

FromFile creates a new connection to an orderer from a JSON file.

func New

func New(organization *organization.Organization, directory string, apiPort int, apiURL string, operationsPort int, operationsURL string) (*Orderer, error)

New creates a new orderer.

func (*Orderer) APIPort

func (o *Orderer) APIPort() int

APIPort returns the API port of the orderer.

func (*Orderer) APIURL

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

APIURL returns the API URL of the orderer.

func (*Orderer) Broadcast

func (o *Orderer) Broadcast(envelope *common.Envelope) error

Broadcast sends an envelope with one or more transactions in to the orderer.

func (*Orderer) Close

func (o *Orderer) Close() error

Close closes any open connection to the orderer.

func (*Orderer) Connect

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

Connect opens a connection to the orderer.

func (*Orderer) Connected

func (o *Orderer) Connected() bool

Connected determines if a connection is open to the peer.

func (*Orderer) ConnectionIdentity

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

ConnectionIdentity returns the identity used to connect to the orderer.

func (*Orderer) ConnectionMSPID

func (o *Orderer) ConnectionMSPID() string

ConnectionMSPID returns the MSP ID used to the connect to the orderer.

func (*Orderer) Deliver

func (p *Orderer) Deliver(envelope *common.Envelope, callback blocks.DeliverCallback) error

Deliver requests one or more blocks from the orderer.

func (*Orderer) Host

func (o *Orderer) Host() string

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

func (*Orderer) Hostname

func (o *Orderer) Hostname() string

Hostname returns the hostname of the orderer.

func (*Orderer) MSPID

func (o *Orderer) MSPID() string

MSPID returns the MSP ID of the orderer.

func (*Orderer) OperationsPort

func (o *Orderer) OperationsPort() int

OperationsPort returns the operations port of the orderer.

func (*Orderer) OperationsURL

func (o *Orderer) OperationsURL() *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) Port

func (o *Orderer) Port() int32

Port returns the port of the orderer.

func (*Orderer) Start

func (o *Orderer) Start(consortium []*organization.Organization) error

Start starts the orderer.

func (*Orderer) Stop

func (o *Orderer) Stop() error

Stop stops the orderer.

Jump to

Keyboard shortcuts

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