client

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoLedger = errors.New("no ledger")

ErrNoLedger indicates that the ledger (channel) doesn't exist

Functions

This section is empty.

Types

type Blockchain

type Blockchain interface {
	GetBlockchainInfo() (*cb.BlockchainInfo, error)
	GetBlockByNumber(blockNumber uint64) (*cb.Block, error)
	GetBlockByHash(blockHash []byte) (*cb.Block, error)
}

Blockchain defines the functions of a Blockchain client

type BlockchainProvider

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

BlockchainProvider manages multiple blockchain clients - one per channel

func NewBlockchainProvider

func NewBlockchainProvider(ledgerProvider common.LedgerProvider) *BlockchainProvider

NewBlockchainProvider returns a new blockchain client provider

func (*BlockchainProvider) ForChannel

func (cp *BlockchainProvider) ForChannel(channelID string) (Blockchain, error)

ForChannel returns the blockchain client for the given channel

Jump to

Keyboard shortcuts

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