Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultClient ¶
type DefaultClient struct {
// contains filtered or unexported fields
}
DefaultClient denotes the default client used for all requests
func NewDefault ¶
func NewDefault(addr string, opts ...Option) *DefaultClient
NewDefault creates a new default client that can be used for all calls to goProbe APIs
func (*DefaultClient) Client ¶
func (c *DefaultClient) Client() *http.Client
Client returns the client's *http.Client
func (*DefaultClient) Modify ¶
Modify activates retry behavior, timeout handling and authorization via the stored key
func (*DefaultClient) NewURL ¶
func (c *DefaultClient) NewURL(path string) string
NewURL synthesizes a new URL for a given path depending on how the client was configured.
Example:
http://localhost:8145/status
type Option ¶
type Option func(*DefaultClient)
Option configures the client
func WithAPIKey ¶
WithAPIKey sets the API key to be presented to the API server
func WithRequestLogging ¶
WithRequestLogging enables logging of client requests
func WithRequestTimeout ¶
WithRequestTimeout sets the timeout for every request
func WithScheme ¶
WithScheme sets the scheme for client requests. http is the default