Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) Close() error
- func (c *Client) Common() *CommonService
- func (c *Client) Do(r *retryablehttp.Request, result interface{}) (*Response, error)
- func (c *Client) ExecuteRequest(method, path string, opt, result interface{}) (*Response, error)
- func (c *Client) NewRequest(method, path string, opt interface{}) (*retryablehttp.Request, error)
- func (c *Client) Query() *QueryService
- type ClientOption
- func WithBasicAuth(username, password string) ClientOption
- func WithCustomBackoff(backoff retryablehttp.Backoff) ClientOption
- func WithCustomErrorHandler(h retryablehttp.ErrorHandler) ClientOption
- func WithCustomRetry(retry retryablehttp.CheckRetry) ClientOption
- func WithHTTPClient(httpClient *http.Client) ClientOption
- func WithRetryMax(retryMax int) ClientOption
- func WithRetryWaitMax(retryWaitMax time.Duration) ClientOption
- func WithRetryWaitMin(retryWaitMin time.Duration) ClientOption
- func WithSkipTLSVerify() ClientOption
- type CommonService
- type Health
- type Properties
- type QueryService
- type Response
- type SelfDiscovered
- type Status
Constants ¶
View Source
const ( StatusEndpoint = "status" HealthEndpoint = "status/health" PropertiesEndpoint = "status/properties" SelfDiscoveredEndpoint = "status/selfDiscovered/status" )
View Source
const ( NativeQueryEndpoint = "druid/v2" SQLQueryEndpoint = "druid/v2/sql" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Common ¶
func (c *Client) Common() *CommonService
func (*Client) ExecuteRequest ¶
func (*Client) NewRequest ¶
func (*Client) Query ¶
func (c *Client) Query() *QueryService
type ClientOption ¶
type ClientOption func(*clientOptions)
func WithBasicAuth ¶
func WithBasicAuth(username, password string) ClientOption
func WithCustomBackoff ¶
func WithCustomBackoff(backoff retryablehttp.Backoff) ClientOption
func WithCustomErrorHandler ¶
func WithCustomErrorHandler(h retryablehttp.ErrorHandler) ClientOption
func WithCustomRetry ¶
func WithCustomRetry(retry retryablehttp.CheckRetry) ClientOption
func WithHTTPClient ¶
func WithHTTPClient(httpClient *http.Client) ClientOption
func WithRetryMax ¶
func WithRetryMax(retryMax int) ClientOption
func WithRetryWaitMax ¶
func WithRetryWaitMax(retryWaitMax time.Duration) ClientOption
func WithRetryWaitMin ¶
func WithRetryWaitMin(retryWaitMin time.Duration) ClientOption
func WithSkipTLSVerify ¶
func WithSkipTLSVerify() ClientOption
type CommonService ¶
type CommonService struct {
// contains filtered or unexported fields
}
func (*CommonService) Properties ¶
func (c *CommonService) Properties() (*Properties, *Response, error)
func (*CommonService) SelfDiscovered ¶
func (c *CommonService) SelfDiscovered() (*SelfDiscovered, *Response, error)
type Properties ¶
type QueryService ¶
type QueryService struct {
// contains filtered or unexported fields
}
type Response ¶
func (*Response) ExtractError ¶
type SelfDiscovered ¶
type SelfDiscovered struct {
SelfDiscovered bool `json:"selfDiscovered"`
}
type Status ¶
type Status struct { Version string `json:"version"` Modules []struct { Name string `json:"name"` Artifact string `json:"artifact"` Version string `json:"version"` } `json:"modules"` Memory struct { MaxMemory int `json:"maxMemory"` TotalMemory int `json:"totalMemory"` FreeMemory int `json:"freeMemory"` UsedMemory int `json:"usedMemory"` DirectMemory int `json:"directMemory"` } `json:"memory"` }
Click to show internal directories.
Click to hide internal directories.