client

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBlockClient

func NewBlockClient(conn *grpc.ClientConn) *blockClient

func NewChainClient

func NewChainClient(conn *grpc.ClientConn) *chainClient

Types

type BlockClient

type BlockClient interface {
	GetByHeight(int64) (*blockpb.GetByHeightResponse, error)
}

type ChainClient

type ChainClient interface {
	//Queries
	GetHead() (*chainpb.GetHeadResponse, error)
	GeStatus() (*chainpb.GetStatusResponse, error)
	GeMetaByHeight(int64) (*chainpb.GetMetaByHeightResponse, error)
}

type Client

type Client struct {
	Chain       ChainClient
	Block       BlockClient
	Transaction TransactionClient
	// contains filtered or unexported fields
}

func New

func New(connStr string) (*Client, error)

func (*Client) Close

func (c *Client) Close() error

type TransactionClient

type TransactionClient interface {
	GetByHeight(int64) (*transactionpb.GetByHeightResponse, error)
}

func NewTransactionClient

func NewTransactionClient(conn *grpc.ClientConn) TransactionClient

Jump to

Keyboard shortcuts

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