Documentation
¶
Index ¶
- Variables
- func NewClient(api QueryAPI) metrics.Client
- func NewPrometheusClient(prometheusUrl string) (metrics.Client, error)
- type Client
- func (c *Client) GetCpuAverage(ctx context.Context, appName, envName string, compNames []string, ...) ([]metrics.LabeledResults, error)
- func (c *Client) GetCpuRequests(ctx context.Context, appName, envName string, compNames []string) ([]metrics.LabeledResults, error)
- func (c *Client) GetMemoryMaximum(ctx context.Context, appName, envName string, compNames []string, ...) ([]metrics.LabeledResults, error)
- func (c *Client) GetMemoryRequests(ctx context.Context, appName, envName string, compNames []string) ([]metrics.LabeledResults, error)
- type QueryAPI
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrComponentsIsRequired = errors.New("components is required and must not be empty")
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetCpuAverage ¶
func (c *Client) GetCpuAverage(ctx context.Context, appName, envName string, compNames []string, duration string) ([]metrics.LabeledResults, error)
GetCpuAverage returns a list of all pods with their average CPU usage. The envName can be empty to return all environments.
func (*Client) GetCpuRequests ¶
func (c *Client) GetCpuRequests(ctx context.Context, appName, envName string, compNames []string) ([]metrics.LabeledResults, error)
GetCpuRequests returns a list of all pods with their CPU requets. The envName can be empty to return all environments.
func (*Client) GetMemoryMaximum ¶
func (c *Client) GetMemoryMaximum(ctx context.Context, appName, envName string, compNames []string, duration string) ([]metrics.LabeledResults, error)
GetMemoryMaximum returns a list of all pods with their maximum Memory usage. The envName can be empty to return all environments.
func (*Client) GetMemoryRequests ¶
func (c *Client) GetMemoryRequests(ctx context.Context, appName, envName string, compNames []string) ([]metrics.LabeledResults, error)
GetMemoryRequests returns a list of all pods with their Memory requets. The envName can be empty to return all environments.
Click to show internal directories.
Click to hide internal directories.