Versions in this module Expand all Collapse all v0 v0.6.0 Mar 19, 2024 v0.5.0 Jun 14, 2023 Changes in this version + type CheckContext interface + ShouldCheck func(p api.ProcessInterface, item *PolicyItem) bool + type CheckType string + const CheckTypeHTTPAvgResponseTime + const CheckTypeHTTPErrorRate + const CheckTypeProcessCPU + const CheckTypeProcessThreadCount + const CheckTypeSystemLoad + type Checker interface + Check func(ctx CheckContext, metricsAppender *MetricsAppender) []ThresholdCause + Close func() error + Fetch func() error + Init func(config *ContinuousConfig) error + SyncPolicies func(policies []*SyncPolicyWithProcesses) + type ContinuousConfig struct + CheckInterval string + FetchInterval string + MeterPrefix string + Trigger TriggerConfig + type LatestWindowData struct + Value D + func (t *LatestWindowData[D]) Accept(data D) + func (t *LatestWindowData[D]) Get() D + func (t *LatestWindowData[D]) Reset() + type MetricsAppender struct + func NewMetricsAppender(prefix string) *MetricsAppender + func (m *MetricsAppender) AppendProcessSingleValue(name string, p api.ProcessInterface, labels map[string]string, value float64) + func (m *MetricsAppender) Flush(ctx context.Context, client v3.MeterReportServiceClient) error + type Policy struct + Items map[CheckType]*PolicyItem + ServicePolicy *ServicePolicy + TargetProfilingType TargetProfilingType + type PolicyItem struct + Count int + Period int + Policy *Policy + Threshold string + URIList []string + URIRegex string + func (p *PolicyItem) SameURIFilter(other *PolicyItem) bool + type ServicePolicy struct + Policies []*Policy + Processes map[string]api.ProcessInterface + Service string + UUID string + type SyncPolicyWithProcesses struct + Policy *Policy + Processes map[string]api.ProcessInterface + type TargetProfilingType string + const TargetProfilingTypeNetwork + const TargetProfilingTypeOffCPU + const TargetProfilingTypeOnCPU + type ThresholdCause interface + FromPolicy func() *PolicyItem + GenerateTransferCause func() *v3.ContinuousProfilingCause + Process func() api.ProcessInterface + type TimeWindows struct + func NewTimeWindows(items []*PolicyItem, generator func() WindowData[V, R]) *TimeWindows[V, R] + func (t *TimeWindows[D, R]) Add(tm time.Time, val D) + func (t *TimeWindows[D, R]) FlushMostRecentData() (R, bool) + func (t *TimeWindows[D, R]) FlushMultipleRecentData() ([]R, bool) + func (t *TimeWindows[V, R]) MatchRule(policy *PolicyItem, check func(slot R) bool) (lastMatch R, isMatch bool) + func (t *TimeWindows[V, R]) ScalePeriod(items []*PolicyItem) + type Trigger interface + Init func(moduleMgr *module.Manager, conf *ContinuousConfig) error + ShouldTrigger func(p api.ProcessInterface) bool + TriggerTasks func(reporter TriggerReporter, causes []ThresholdCause) int + type TriggerConfig struct + ExecuteDuration string + SilenceDuration string + type TriggerReporter interface + ReportProcesses func(causeProcess api.ProcessInterface, profilingProcesses []api.ProcessInterface, ...) (*task.Context, error) + type URIChecker struct + FixedURIList []string + URIRegexList []*regexp.Regexp + type URIResponseDurationTimeoutRate struct + Rate int + Timeout int + type WindowData interface + Accept func(data D) + Get func() R + Reset func() + func NewLatestWindowData() WindowData[D, D]