client

package
v0.7.9-rc19 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrClientNotFound is a new error with message "Client not found"
	ErrClientNotFound = errors.New("Client not found")

	// ErrBroadcastTx is used when a broadcast fails due to tendermint errors
	ErrBroadcastTx = errors.New("broadcast tx error")
)

Functions

This section is empty.

Types

type Client

type Client interface {
	Query() QueryClient
	Tx() TxClient
}

Client interface pre-defined with query and tx interfaces

func NewClient

func NewClient(
	log log.Logger,
	cctx sdkclient.Context,
	txf tx.Factory,
	info keyring.Info,
	passphrase string,
	qclient QueryClient,
) Client

NewClient creates new client instance to interface with terndermint.

type QueryClient

type QueryClient interface {
	dtypes.QueryClient
	mtypes.QueryClient
	ptypes.QueryClient

	// TODO: implement with search parameters
	ActiveLeasesForProvider(id sdk.AccAddress) (mtypes.Leases, error)
}

QueryClient interface includes query clients of deployment, market and provider modules

func NewQueryClient

func NewQueryClient(
	dclient dtypes.QueryClient,
	mclient mtypes.QueryClient,
	pclient ptypes.QueryClient,
) QueryClient

NewQueryClient creates new query client instance

type TxClient

type TxClient interface {
	Broadcast(...sdk.Msg) error
}

TxClient interface

Directories

Path Synopsis
docs

Jump to

Keyboard shortcuts

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