client

package
v0.4.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAccountClient

func NewAccountClient(conn *grpc.ClientConn) *accountClient

func NewBlockClient

func NewBlockClient(conn *grpc.ClientConn) *blockClient

func NewChainClient

func NewChainClient(conn *grpc.ClientConn) *chainClient

Types

type AccountClient

type AccountClient interface {
	GetByAddress(string, int64) (*accountpb.GetByAddressResponse, error)
}

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 {
	Account     AccountClient
	Chain       ChainClient
	Block       BlockClient
	State       StateClient
	Validator   ValidatorClient
	Transaction TransactionClient
	// contains filtered or unexported fields
}

func New

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

func (*Client) Close

func (c *Client) Close() error

type StateClient

type StateClient interface {
	GetByHeight(int64) (*statepb.GetByHeightResponse, error)
	GetStakingByHeight(int64) (*statepb.GetStakingByHeightResponse, error)
}

func NewStateClient

func NewStateClient(conn *grpc.ClientConn) StateClient

type TransactionClient

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

func NewTransactionClient

func NewTransactionClient(conn *grpc.ClientConn) TransactionClient

type ValidatorClient

type ValidatorClient interface {
	GetByHeight(int64) (*validatorpb.GetByHeightResponse, error)
}

func NewValidatorClient

func NewValidatorClient(conn *grpc.ClientConn) ValidatorClient

Jump to

Keyboard shortcuts

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