Documentation ¶
Index ¶
- Variables
- func DaemonContext(cctx *cli.Context) context.Context
- func EnvsForAPIInfos(t repo.RepoType) (primary string, fallbacks []string, deprecated []string)
- func GetCommonAPI(ctx *cli.Context) (api.CommonNet, jsonrpc.ClientCloser, error)
- func GetFullNodeAPI(ctx *cli.Context) (v0api.FullNode, jsonrpc.ClientCloser, error)
- func GetFullNodeAPIV1(ctx *cli.Context) (v1api.FullNode, jsonrpc.ClientCloser, error)
- func GetGatewayAPI(ctx *cli.Context) (api.Gateway, jsonrpc.ClientCloser, error)
- func GetGatewayAPIV0(ctx *cli.Context) (v0api.Gateway, jsonrpc.ClientCloser, error)
- func GetMarketsAPI(ctx *cli.Context) (api.StorageMiner, jsonrpc.ClientCloser, error)
- func GetRawAPI(ctx *cli.Context, t repo.RepoType, version string) (string, http.Header, error)
- func GetStorageMinerAPI(ctx *cli.Context, opts ...GetStorageMinerOption) (api.StorageMiner, jsonrpc.ClientCloser, error)
- func GetWorkerAPI(ctx *cli.Context) (api.Worker, jsonrpc.ClientCloser, error)
- func ReqContext(cctx *cli.Context) context.Context
- func StorageMinerUseHttp(opts *GetStorageMinerOptions)
- type APIInfo
- type GetStorageMinerOption
- type GetStorageMinerOptions
Constants ¶
This section is empty.
Variables ¶
var FlagVeryVerbose = &cli.BoolFlag{ Name: "vv", Usage: "enables very verbose mode, useful for debugging the CLI", Destination: &IsVeryVerbose, }
FlagVeryVerbose enables very verbose mode, which is useful when debugging the CLI itself. It should be included as a flag on the top-level command (e.g. lotus -vv, lotus-miner -vv).
var IsVeryVerbose bool
IsVeryVerbose is a global var signalling if the CLI is running in very verbose mode or not (default: false).
Functions ¶
func DaemonContext ¶ added in v1.5.1
func EnvsForAPIInfos ¶ added in v1.11.1
EnvsForAPIInfos returns the environment variables to use in order of precedence to determine the API endpoint of the specified node type.
It returns the current variables and deprecated ones separately, so that the user can log a warning when deprecated ones are found to be in use.
func GetCommonAPI ¶ added in v1.11.1
func GetFullNodeAPI ¶ added in v1.5.1
func GetFullNodeAPIV1 ¶ added in v1.9.0
func GetGatewayAPI ¶ added in v1.5.1
func GetGatewayAPIV0 ¶ added in v1.9.0
func GetMarketsAPI ¶ added in v1.11.1
func GetMarketsAPI(ctx *cli.Context) (api.StorageMiner, jsonrpc.ClientCloser, error)
func GetStorageMinerAPI ¶ added in v1.5.1
func GetStorageMinerAPI(ctx *cli.Context, opts ...GetStorageMinerOption) (api.StorageMiner, jsonrpc.ClientCloser, error)
func GetWorkerAPI ¶ added in v1.5.1
func ReqContext ¶ added in v1.5.1
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 StorageMinerUseHttp ¶ added in v1.5.1
func StorageMinerUseHttp(opts *GetStorageMinerOptions)
Types ¶
type APIInfo ¶
func GetAPIInfo ¶ added in v1.5.1
GetAPIInfo returns the API endpoint to use for the specified kind of repo.
The order of precedence is as follows:
- *-api-url command line flags.
- *_API_INFO environment variables
- deprecated *_API_INFO environment variables
- *-repo command line flags.
func ParseApiInfo ¶
func (APIInfo) AuthHeader ¶
type GetStorageMinerOption ¶ added in v1.5.1
type GetStorageMinerOption func(*GetStorageMinerOptions)
type GetStorageMinerOptions ¶ added in v1.5.1
type GetStorageMinerOptions struct {
PreferHttp bool
}