Documentation ¶
Index ¶
- 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 lotus_repo.RepoType, version string) (string, http.Header, error)
- type APIInfo
- type GetBoostOption
- type GetBoostOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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.