fabric_adapter

package
v0.0.0-...-f30a169 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FabricSDKAdapter

type FabricSDKAdapter struct {
	EventClient  *event.Client
	LedgerClient *ledger.Client
	// contains filtered or unexported fields
}

FabricSDKAdapter is the implementation of SDKAdapter interface for Fabric

func NewFabricSDKAdapter

func NewFabricSDKAdapter(chainId string, ymlFile string, user string, peers []*conf.Peer) (*FabricSDKAdapter, error)

NewFabricSDKAdapter creates FabricSDKAdapter with chainId, user, peers, ymlFile path and log

func (*FabricSDKAdapter) GetBlockByHeight

func (fs *FabricSDKAdapter) GetBlockByHeight(blockHeight uint64) (common.Blocker, error)

GetBlockByHeight gets the block of a specific height from remote chain

func (*FabricSDKAdapter) GetChainConfig

func (fs *FabricSDKAdapter) GetChainConfig() (*protogo.RemoteConfig, error)

GetChainConfig gets the config of remote chain

func (*FabricSDKAdapter) GetChainHeight

func (fs *FabricSDKAdapter) GetChainHeight() (uint64, error)

GetChainHeight gets the height of the remote chain

func (*FabricSDKAdapter) GetTransactionByTxKey

func (fs *FabricSDKAdapter) GetTransactionByTxKey(txKey string) (common.Transactioner, error)

GetTransactionByTxKey gets the transaction by transaction id from remote chain

func (*FabricSDKAdapter) Stop

func (fs *FabricSDKAdapter) Stop() error

Stop closes connection pool and release resource

func (*FabricSDKAdapter) SubscribeBlock

func (fs *FabricSDKAdapter) SubscribeBlock() (chan common.Blocker, error)

SubscribeBlock subscribes to the latest block generated by the remote chain

Jump to

Keyboard shortcuts

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