Documentation
¶
Index ¶
- type FabricSDKAdapter
- func (fs *FabricSDKAdapter) GetBlockByHeight(blockHeight uint64) (common.Blocker, error)
- func (fs *FabricSDKAdapter) GetChainConfig() (*protogo.RemoteConfig, error)
- func (fs *FabricSDKAdapter) GetChainHeight() (uint64, error)
- func (fs *FabricSDKAdapter) GetTransactionByTxKey(txKey string) (common.Transactioner, error)
- func (fs *FabricSDKAdapter) Stop() error
- func (fs *FabricSDKAdapter) SubscribeBlock() (chan common.Blocker, error)
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
Click to show internal directories.
Click to hide internal directories.