client

package
v0.0.0-...-e391bab Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2021 License: Apache-2.0 Imports: 20 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")
)

Functions

This section is empty.

Types

type Client

type Client interface {
	Query() QueryClient
	Tx() broadcaster.Client
}

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,
	qclient QueryClient,
) Client

NewClient creates new client instance to interface with tendermint.

func NewClientWithBroadcaster

func NewClientWithBroadcaster(
	log log.Logger,
	cctx sdkclient.Context,
	txf tx.Factory,
	info keyring.Info,
	qclient QueryClient,
	bclient broadcaster.Client,
) Client

type QueryClient

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

	// TODO: implement with search parameters
	ActiveLeasesForProvider(id sdk.AccAddress) ([]mtypes.QueryLeaseResponse, 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,
	aclient atypes.QueryClient,
	cclient ctypes.QueryClient,
) QueryClient

NewQueryClient creates new query client instance

func NewQueryClientFromCtx

func NewQueryClientFromCtx(cctx sdkclient.Context) QueryClient

Directories

Path Synopsis
docs

Jump to

Keyboard shortcuts

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