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
Click to show internal directories.
Click to hide internal directories.