Documentation ¶
Index ¶
- Variables
- func BoostUseHttp(opts *GetBoostOptions)
- func EnvsForAPIInfos(t lotus_repo.RepoType) (primary string, fallbacks []string, deprecated []string)
- func GetBoostAPI(ctx *cli.Context, opts ...GetBoostOption) (api.Boost, jsonrpc.ClientCloser, error)
- func GetRawAPI(ctx *cli.Context, t repo.RepoType, version string) (string, http.Header, error)
- type APIInfo
- type GetBoostOption
- type GetBoostOptions
Constants ¶
This section is empty.
Variables ¶
View Source
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. boost -vv).
View Source
var IsVeryVerbose bool
IsVeryVerbose is a global var signalling if the CLI is running in very verbose mode or not (default: false).
Functions ¶
func BoostUseHttp ¶
func BoostUseHttp(opts *GetBoostOptions)
func EnvsForAPIInfos ¶
func EnvsForAPIInfos(t lotus_repo.RepoType) (primary string, fallbacks []string, deprecated []string)
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 GetBoostAPI ¶
func GetBoostAPI(ctx *cli.Context, opts ...GetBoostOption) (api.Boost, jsonrpc.ClientCloser, error)
Types ¶
type APIInfo ¶
func GetAPIInfo ¶
func GetAPIInfo(ctx *cli.Context, t lotus_repo.RepoType) (APIInfo, error)
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 GetBoostOption ¶
type GetBoostOption func(*GetBoostOptions)
type GetBoostOptions ¶
type GetBoostOptions struct {
PreferHttp bool
}
Click to show internal directories.
Click to hide internal directories.