Documentation ¶
Index ¶
- Constants
- func PercentileOf(seq []float64, x float64) float64
- type AvailabilityZones
- type BiB
- type CPU
- type Cluster
- type Compute
- type Engine
- type GHz
- type MinMax
- type Node
- type Percentile
- type Region
- type Rule
- type Status
- type StatusCluster
- type StatusCode
- type StatusNode
- type StatusRegion
- type Storage
Constants ¶
View Source
const ( KiB = BiB(1024) MiB = BiB(1024 * 1024) GiB = BiB(1024 * 1024 * 1024) TiB = BiB(1024 * 1024 * 1024 * 1024) )
Variables ¶
This section is empty.
Functions ¶
func PercentileOf ¶
Approximate percentile value for threshold X
Types ¶
type AvailabilityZones ¶
type AvailabilityZones []string
Availability Zones Node is deployed to
func (AvailabilityZones) String ¶
func (v AvailabilityZones) String() string
type Cluster ¶
type Cluster struct { ID string `json:"id"` Engine *Engine `json:"engine,omitempty"` Reader []Node `json:"reader,omitempty"` Writer []Node `json:"writer,omitempty"` }
DB cluster topology
type MinMax ¶
type MinMax struct {
Min, Avg, Max float64
}
func NewMinMaxSoft ¶
func (MinMax) MarshalJSON ¶
type Node ¶
type Node struct { ID string `json:"id"` Name string `json:"name"` Type string `json:"type"` Zones AvailabilityZones `json:"zones"` Engine *Engine `json:"engine,omitempty"` Storage *Storage `json:"storage,omitempty"` Compute *Compute `json:"compute,omitempty"` ReadOnly bool `json:"readonly"` }
Cluster Node
type Percentile ¶
type Percentile struct { P50 float64 `json:"p50"` P95 float64 `json:"p95"` P99 float64 `json:"p99"` P999 float64 `json:"p999"` }
func NewPercentile ¶
func NewPercentile(seq []float64) Percentile
func (Percentile) MarshalJSON ¶
func (x Percentile) MarshalJSON() ([]byte, error)
func (Percentile) String ¶
func (x Percentile) String() string
type Rule ¶
type Status ¶
type Status struct { Code StatusCode `json:"status"` Rule Rule `json:"rule"` Interval time.Duration `json:"-"` SuccessRate *float64 `json:"success_rate,omitempty"` HardMM *MinMax `json:"hard_minmax,omitempty"` SoftMM *MinMax `json:"soft_minmax,omitempty"` Aggregator *string `json:"aggregator,omitempty"` Percentile *Percentile `json:"distribution,omitempty"` }
Status of rule evaluation
func (Status) MarshalJSON ¶
type StatusCluster ¶
type StatusCluster struct { Status StatusCode Cluster *Cluster Writer []StatusNode Reader []StatusNode }
type StatusCode ¶
type StatusCode int
const ( STATUS_CODE_UNKNOWN StatusCode = iota STATUS_CODE_SUCCESS STATUS_CODE_WARNING STATUS_CODE_FAILURE )
func (StatusCode) MarshalJSON ¶
func (code StatusCode) MarshalJSON() ([]byte, error)
func (StatusCode) String ¶
func (v StatusCode) String() string
type StatusNode ¶
type StatusNode struct { Status StatusCode `json:"code,omitempty"` Node *Node `json:"node,omitempty"` Checks []Status `json:"status,omitempty"` }
func (StatusNode) String ¶
func (v StatusNode) String() string
type StatusRegion ¶
type StatusRegion struct { Status StatusCode Clusters []StatusCluster Nodes []StatusNode }
func (StatusRegion) String ¶
func (v StatusRegion) String() string
Click to show internal directories.
Click to hide internal directories.