Documentation ¶
Index ¶
- Variables
- func DaemonContext(cctx *cli.Context) context.Context
- func GetAPI(ctx *cli.Context) (api.Common, jsonrpc.ClientCloser, error)
- func GetFullNodeAPI(ctx *cli.Context) (api.FullNode, jsonrpc.ClientCloser, error)
- func GetRawAPI(ctx *cli.Context, t repo.RepoType) (string, http.Header, error)
- func GetStorageMinerAPI(ctx *cli.Context) (api.StorageMiner, jsonrpc.ClientCloser, error)
- func ReqContext(cctx *cli.Context) context.Context
- func SizeStr(size types.BigInt) string
- func SyncWait(ctx context.Context, napi api.FullNode) error
- type APIInfo
- type ApiConnector
Constants ¶
This section is empty.
Variables ¶
View Source
var Commands = []*cli.Command{
authCmd,
chainCmd,
clientCmd,
createMinerCmd,
fetchParamCmd,
mpoolCmd,
netCmd,
paychCmd,
sendCmd,
stateCmd,
syncCmd,
versionCmd,
walletCmd,
}
View Source
var Units = []string{"B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB"}
Functions ¶
func DaemonContext ¶
func GetFullNodeAPI ¶
func GetFullNodeAPI(ctx *cli.Context) (api.FullNode, jsonrpc.ClientCloser, error)
func GetStorageMinerAPI ¶
func GetStorageMinerAPI(ctx *cli.Context) (api.StorageMiner, jsonrpc.ClientCloser, error)
func ReqContext ¶
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.
Types ¶
type APIInfo ¶
type APIInfo struct { Addr multiaddr.Multiaddr Token []byte }
func (APIInfo) AuthHeader ¶
Click to show internal directories.
Click to hide internal directories.