Documentation ¶
Index ¶
- type Client
- func (c *Client) CallAPI(ctx context.Context, method string, rel *url.URL, body, out interface{}) (err error)
- func (c *Client) Metrics(ctx context.Context) (ret []v1.Metric, err error)
- func (c *Client) SetStatus(ctx context.Context, patch v1.Status) (ret v1.Status, err error)
- func (c *Client) Status(ctx context.Context) (ret v1.Status, err error)
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client is a simple HTTP client for the REST API.
func (*Client) CallAPI ¶
func (c *Client) CallAPI(ctx context.Context, method string, rel *url.URL, body, out interface{}) (err error)
CallAPI executes the desired REST API request. it's expected that the body and out are the structs that follows the JSON:API
type Option ¶
type Option func(*Client)
Option function are helpers that enable the flexible configuration of the REST API client.
func WithHTTPClient ¶
WithHTTPClient configures the supplied HTTP client to be used when making REST API requests.
func WithLogger ¶
WithLogger sets the specified logger to the client.
Click to show internal directories.
Click to hide internal directories.