Documentation ¶
Index ¶
- Constants
- type CheckFn
- type Conclusion
- type ExecuteFn
- type Facts
- func (facts *Facts) AddBoolValue(key string, value bool)
- func (facts *Facts) AddIntValue(key string, value int64)
- func (facts *Facts) AddReport(report *Report)
- func (facts *Facts) AddStringValue(key string, value string)
- func (facts *Facts) GetApmTrace() *trace.OTelTrace
- func (facts *Facts) GetBoolValue(key string) bool
- func (facts *Facts) GetFlowId() uint64
- func (facts *Facts) GetIntValue(key string) int64
- func (facts *Facts) GetProfiles() *model.Profiles
- func (facts *Facts) GetReport() *Report
- func (facts *Facts) GetReports() *Reports
- func (facts *Facts) GetStringValue(key string) string
- func (facts *Facts) GetTrace() *model.Trace
- func (facts *Facts) GetTraces() *model.Traces
- func (facts *Facts) HasReport() bool
- func (facts *Facts) SetApmTrace(apmTrace *trace.OTelTrace)
- func (facts *Facts) SetProfiles(profiles *model.Profiles)
- func (facts *Facts) SetTrace(trace *model.Trace)
- func (facts *Facts) SetTraces(traces *model.Traces)
- type Flow
- type FlowNode
- type Metadata
- type MetricType
- type Report
- type ReportAction
- type ReportBaseLineMetric
- type ReportBaseLineMetrics
- type ReportMetric
- type ReportTimeSeriesMetric
- type ReportValue
- type Reports
- type Result
- type Rule
Constants ¶
View Source
const ( FLOW_START = "start" FLOW_EVENT = "event" FLOW_SLOW = "slow" FLOW_CPU = "cpu" FLOW_CPU_SYS = "cpu_sys" FLOW_CPU_USER = "cpu_user" FLOW_RUNQ = "runq" FLOW_NET = "net" FLOW_EPOLL = "epoll" FLOW_STOP = "stop" )
View Source
const ( ReportActionTypeProm = "promql" ReportActionTypeEs = "es" ReportTypeTimeSeries = "metrics_timeseries" ResultPromTypeMatrix = "matrix" ChartTypeLine = "line" )
View Source
const ( RULE_CPU_STEAL = "cpu_steal" RULE_CPU_CFS_THROTTLED = "cpu_cfs_throttled" RULE_NODE_THROUGHPUT = "node_throughput" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conclusion ¶
type Conclusion struct {
Message string `json:"message"`
}
type Facts ¶
type Facts struct {
// contains filtered or unexported fields
}
func (*Facts) AddBoolValue ¶
func (*Facts) AddIntValue ¶
func (*Facts) AddStringValue ¶
func (*Facts) GetApmTrace ¶
func (*Facts) GetBoolValue ¶
func (*Facts) GetIntValue ¶
func (*Facts) GetProfiles ¶
func (*Facts) GetReports ¶
func (*Facts) GetStringValue ¶
func (*Facts) SetApmTrace ¶
func (*Facts) SetProfiles ¶
type FlowNode ¶
type FlowNode struct {
// contains filtered or unexported fields
}
func NewFlowNode ¶
type MetricType ¶
type MetricType int
const ( MetricNone MetricType = iota MetricTimeSeries MetricBaseLines )
type Report ¶
type Report struct { FlowName string `json:"flow_name,omitempty"` ReportName string `json:"report_name"` Type string `json:"type"` Chart string `json:"chart"` Source string `json:"source"` Request string `json:"request"` Metrics map[string]ReportMetric `json:"metrics"` Text map[string]string `json:"text"` Conclusion string `json:"conclusion"` Timestamp uint64 `json:"timestamp"` }
func (*Report) AddMetrics ¶
func (report *Report) AddMetrics(key string, metric ReportMetric) *Report
func (*Report) SetConclusion ¶
func (*Report) SetRequest ¶
type ReportAction ¶
type ReportBaseLineMetric ¶
type ReportBaseLineMetric struct { Labels map[string]string `json:"labels"` BaseLine *ReportValue `json:"baseline"` Current *ReportValue `json:"current"` Unit string `json:"unit"` IsWarn bool `json:"is_warn"` }
type ReportBaseLineMetrics ¶
type ReportBaseLineMetrics []*ReportBaseLineMetric
func NewReportBaseLineMetricsWithMetrics ¶
func NewReportBaseLineMetricsWithMetrics(metrics []*ReportBaseLineMetric) ReportBaseLineMetrics
func (ReportBaseLineMetrics) Type ¶
func (metric ReportBaseLineMetrics) Type() MetricType
type ReportMetric ¶
type ReportMetric interface {
Type() MetricType
}
type ReportTimeSeriesMetric ¶
type ReportTimeSeriesMetric struct { Action *ReportAction `json:"action"` ResultType string `json:"resultType"` Result model.Matrix `json:"result"` }
func (*ReportTimeSeriesMetric) Type ¶
func (metric *ReportTimeSeriesMetric) Type() MetricType
type ReportValue ¶
type ReportValue struct { Action *ReportAction `json:"action"` Value float64 `json:"value"` }
func NewReportAction ¶
func NewReportAction(actionType string, text string, value float64) *ReportValue
func NewReportValue ¶
func NewReportValue(value float64) *ReportValue
type Reports ¶
type Reports struct { Metadata *Metadata `json:"metadata"` Conclusion *Conclusion `json:"conclusion"` Reports []*Report `json:"reports"` }
func NewReports ¶
func NewReports() *Reports
func (*Reports) AddConclusion ¶
func (*Reports) AddMetaData ¶
Click to show internal directories.
Click to hide internal directories.