analyst

package
v0.0.0-...-3eef760 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 16, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnomalyInfo

type AnomalyInfo struct {
	Tags   string    `json:"tags"`
	Values []float64 `json:"values"`
}

type ApplicationHealthAnalyzeRequest

type ApplicationHealthAnalyzeRequest struct {
	AppName string `json:"appName"`

	//RFC3339     = "2006-01-02T15:04:05Z07:00"
	StartTime string `json:"startTime"`

	//RFC3339     = "2006-01-02T15:04:05Z07:00"
	EndTime string `json:"endTime"`

	//// key: current, baseline, historical
	Metrics m.MetricsInfo `json:"metrics"`

	// canary or blue-green
	Strategy string `json:"strategy"`

	// Namespace
	Namespace string `json:"namespace,omitempty"`

	// Pod count url
	PodCountURL m.MetricQuery `json:"podCountURL,omitempty"`
}

type ApplicationHealthAnalyzeResponse

type ApplicationHealthAnalyzeResponse struct {
	StatusCode int32 `json:"statusCode"`

	Reason string `json:"reason,omitempty"`

	JobId string `json:"jobId"`

	Status string `json:"status"`

	Anomaly map[string]AnomalyInfo `json:"anomaly,omitempty"`

	HpaLogs []d.HpaLogEntry `json:"hpaLogs"`
}

type Client

type Client struct {
	BaseURL   *url.URL
	UserAgent string

	DoFunc func(req *http.Request) (*http.Response, error)
}

func NewClient

func NewClient(httpClient *http.Client, endpoint string) (*Client, error)

func (*Client) GetStatus

func (c *Client) GetStatus(jobId string) (ApplicationHealthAnalyzeResponse, error)

func (*Client) StartAnalyzing

func (c *Client) StartAnalyzing(namespace string, appName string, podNames [][]string, endpoint string, metrics d.Metrics,
	timeWindow time.Duration, strategy string, metricAliases []string) (string, error)

type Interface

type Interface interface {
	StartAnalyzing(namespace string, appName string, podNames [][]string, endpoint string, metrics d.Metrics, timeWindow time.Duration) (string, error)
	GetStatus(jobId string) (ApplicationHealthAnalyzeResponse, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL