Documentation ¶
Index ¶
- func GetStatusQuery(name string) string
- func GetStatusQueryByDestination(name string) string
- func GetStatusQueryBySource(name string) string
- func GetWorkloadQuery() string
- func GetWorkloads(addr string) (map[string]Workload, error)
- type AggregatedStatus
- type AggregatedStatusItem
- type Workload
- type WorkloadStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetStatusQueryByDestination ¶
GetStatusQueryByDestination returns a query
func GetStatusQueryBySource ¶
GetStatusQueryBySource returns a query
Types ¶
type AggregatedStatus ¶
type AggregatedStatus struct { Step time.Duration Status map[int64]AggregatedStatusItem }
AggregatedStatus calculates status.
func (*AggregatedStatus) AddStatus ¶
func (as *AggregatedStatus) AddStatus( t time.Time, v float64, ) map[int64]AggregatedStatusItem
AddStatus adds a new workload status.
func (*AggregatedStatus) Aggregate ¶
func (as *AggregatedStatus) Aggregate( hsv utils.SliceFloat64, ) []AggregatedStatusItem
Aggregate turns the map to an aggregated array.
type AggregatedStatusItem ¶
type AggregatedStatusItem struct { Time time.Time `json:"date"` Status string `json:"status"` Values []float64 `json:"-"` // pointer as they can be JSON null ApproximateMedian *float64 `json:"approximateMedian"` Avg *float64 `json:"avg"` Median *float64 `json:"median"` }
AggregatedStatusItem holds the status.
type Workload ¶
type Workload struct { Name string `json:"name"` // name of the workload App string `json:"app,omitempty"` // istio app Sources []Workload `json:"sources"` Destinations []Workload `json:"destinations"` Statuses []AggregatedStatusItem `json:"statuses"` }
Workload struct.
func GetWorkloadStatusByName ¶
func GetWorkloadStatusByName( addr string, name string, start time.Time, end time.Time, historical time.Duration, statusStep time.Duration, ) (*Workload, error)
GetWorkloadStatusByName returns a single workload with it's status.
func (*Workload) AddDestination ¶
AddDestination adds a destination workload
type WorkloadStatus ¶
WorkloadStatus struct.
Click to show internal directories.
Click to hide internal directories.