Documentation ¶
Index ¶
- Variables
- func ApiAddrToUrl(apiAddr string) (*url.URL, error)
- func ClientExportStream(apiAddr string, apiAuth http.Header, eref api.ExportRef, car bool) (io.ReadCloser, error)
- func DaemonContext(cctx *cli.Context) context.Context
- func EpochTime(curr, e abi.ChainEpoch) string
- func EpochTimeTs(curr, e abi.ChainEpoch, ts *types.TipSet) string
- func FullNodeProxy[T api.FullNode](ins []T, outstr *api.FullNodeStruct)
- 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, opts ...GetFullNodeOption) (v1api.FullNode, jsonrpc.ClientCloser, error)
- func GetFullNodeAPIV1Single(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 OnSingleNode(ctx context.Context) context.Context
- func ReqContext(cctx *cli.Context) context.Context
- func StorageMinerUseHttp(opts *GetStorageMinerOptions)
- type APIInfo
- type GetFullNodeOption
- type GetFullNodeOptions
- type GetStorageMinerOption
- type GetStorageMinerOptions
- type HttpHead
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 ClientExportStream ¶
func DaemonContext ¶
func EpochTime ¶
func EpochTime(curr, e abi.ChainEpoch) string
func EpochTimeTs ¶
func EpochTimeTs(curr, e abi.ChainEpoch, ts *types.TipSet) string
EpochTimeTs is like EpochTime, but also outputs absolute time. `ts` is only used to provide a timestamp at some epoch to calculate time from. It can be a genesis tipset.
Example output: `1944975 (01 Jul 22 08:07 CEST, 10 hours 29 minutes ago)`
func FullNodeProxy ¶
func FullNodeProxy[T api.FullNode](ins []T, outstr *api.FullNodeStruct)
func GetCommonAPI ¶
func GetFullNodeAPI ¶
func GetFullNodeAPIV1 ¶
func GetFullNodeAPIV1(ctx *cli.Context, opts ...GetFullNodeOption) (v1api.FullNode, jsonrpc.ClientCloser, error)
func GetFullNodeAPIV1Single ¶
func GetGatewayAPI ¶
func GetGatewayAPIV0 ¶
func GetMarketsAPI ¶
func GetMarketsAPI(ctx *cli.Context) (api.StorageMiner, jsonrpc.ClientCloser, error)
func GetStorageMinerAPI ¶
func GetStorageMinerAPI(ctx *cli.Context, opts ...GetStorageMinerOption) (api.StorageMiner, jsonrpc.ClientCloser, error)
func GetWorkerAPI ¶
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.
func StorageMinerUseHttp ¶
func StorageMinerUseHttp(opts *GetStorageMinerOptions)
Types ¶
type APIInfo ¶
func GetAPIInfoMulti ¶
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 ParseApiInfoMulti ¶
func (APIInfo) AuthHeader ¶
type GetFullNodeOption ¶
type GetFullNodeOption func(*GetFullNodeOptions)
func FullNodeWithEthSubscribtionHandler ¶
func FullNodeWithEthSubscribtionHandler(sh api.EthSubscriber) GetFullNodeOption
type GetFullNodeOptions ¶
type GetFullNodeOptions struct {
// contains filtered or unexported fields
}
type GetStorageMinerOption ¶
type GetStorageMinerOption func(*GetStorageMinerOptions)
type GetStorageMinerOptions ¶
type GetStorageMinerOptions struct {
PreferHttp bool
}