Documentation ¶
Index ¶
- func GetClientOptions(config *StakingClientConfig) ([]option.ClientOption, error)
- func GetHTTPClient(serviceName string, config *StakingClientConfig) (*http.Client, error)
- func LROOptions(op LongRunningOperation, version string, opts []gax.CallOption) []gax.CallOption
- type LongRunningOperation
- type StakingClientConfig
- type StakingClientOption
- func WithAPIKey(apiKey *auth.APIKey) StakingClientOption
- func WithClientOptions(clientOptions ...option.ClientOption) StakingClientOption
- func WithEndpoint(endpoint string) StakingClientOption
- func WithHTTPClient(httpClient *http.Client) StakingClientOption
- func WithInsecure(insecure bool) StakingClientOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetClientOptions ¶
func GetClientOptions(config *StakingClientConfig) ([]option.ClientOption, error)
GetClientOptions returns the list of ClientOptions based on the given endpoint, service name, and config.
func GetHTTPClient ¶
func GetHTTPClient(serviceName string, config *StakingClientConfig) (*http.Client, error)
GetHTTPClient returns the HTTPClient based on the given service name and config.
func LROOptions ¶
func LROOptions(op LongRunningOperation, version string, opts []gax.CallOption) []gax.CallOption
LROOptions returns the call options for long-running operations. This overrides the gapic generated client `WithPath` call option that ignores the path prefix, with a call option that includes the path prefix.
Types ¶
type LongRunningOperation ¶
LongRunningOperation is the interface for long-running operations that is used to create the gax call options for interacting with LROs.
type StakingClientConfig ¶
type StakingClientConfig struct { Endpoint string ServiceName string APIKey *auth.APIKey HTTPClient *http.Client ClientOptions []option.ClientOption Insecure bool }
StakingClientConfig stores configuration information about a Staking client.
func GetConfig ¶
func GetConfig( serviceName string, defaultEndpoint string, stakingOpts ...StakingClientOption, ) (*StakingClientConfig, error)
GetConfig returns a StakingClientConfig with all the StakingClientOptions applied. It uses the given default endpoint if none of the options set it.
type StakingClientOption ¶
type StakingClientOption func(c *StakingClientConfig)
StakingClientOption is a function that applies changes to a clientConfig.
func WithAPIKey ¶
func WithAPIKey(apiKey *auth.APIKey) StakingClientOption
WithAPIKey returns an option to set the Coinbase Cloud API Key.
func WithClientOptions ¶
func WithClientOptions(clientOptions ...option.ClientOption) StakingClientOption
WithClientOptions returns an option to set the inner set of ClientOptions.
func WithEndpoint ¶
func WithEndpoint(endpoint string) StakingClientOption
WithEndpoint returns an option to set the service endpoint.
func WithHTTPClient ¶
func WithHTTPClient(httpClient *http.Client) StakingClientOption
WithHTTPClient returns an option to set the HTTP Client.
func WithInsecure ¶
func WithInsecure(insecure bool) StakingClientOption
WithInsecure returns an option to set the insecure flag. If insecure is set to true, the client will not use transport authentication.