cli

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2020 License: Apache-2.0, MIT Imports: 38 Imported by: 52

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Commands = []*cli.Command{
	authCmd,
	chainCmd,
	clientCmd,
	fetchParamCmd,
	mpoolCmd,
	netCmd,
	paychCmd,
	sendCmd,
	stateCmd,
	syncCmd,
	versionCmd,
	walletCmd,
}

Functions

func DaemonContext

func DaemonContext(cctx *cli.Context) context.Context

func GetAPI

func GetAPI(ctx *cli.Context) (api.Common, jsonrpc.ClientCloser, error)

func GetFullNodeAPI

func GetFullNodeAPI(ctx *cli.Context) (api.FullNode, jsonrpc.ClientCloser, error)

func GetRawAPI

func GetRawAPI(ctx *cli.Context, t repo.RepoType) (string, http.Header, error)

func GetStorageMinerAPI

func GetStorageMinerAPI(ctx *cli.Context) (api.StorageMiner, jsonrpc.ClientCloser, error)

func ReqContext

func ReqContext(cctx *cli.Context) context.Context

ReqContext returns context for cli execution. Calling it for the first time installs SIGTERM handler that will close returned context. Not safe for concurrent execution.

func SyncWait

func SyncWait(ctx context.Context, napi api.FullNode) error

Types

type APIInfo

type APIInfo struct {
	Addr  multiaddr.Multiaddr
	Token []byte
}

func GetAPIInfo

func GetAPIInfo(ctx *cli.Context, t repo.RepoType) (APIInfo, error)

func (APIInfo) AuthHeader

func (a APIInfo) AuthHeader() http.Header

func (APIInfo) DialArgs

func (a APIInfo) DialArgs() (string, error)

type ApiConnector

type ApiConnector func() api.FullNode

ApiConnector returns API instance

Jump to

Keyboard shortcuts

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