Documentation ¶
Index ¶
- type BaseChecker
- type HTTPBasedChecker
- func (n *HTTPBasedChecker[Data]) Check(ctx base.CheckContext, metricsAppender *base.MetricsAppender) []base.ThresholdCause
- func (n *HTTPBasedChecker[Data]) Close() error
- func (n *HTTPBasedChecker[Data]) Fetch() error
- func (n *HTTPBasedChecker[Data]) ReceiveBufferEvent(event network.BufferEvent)
- func (n *HTTPBasedChecker[Data]) SyncPolicies(policies []*base.SyncPolicyWithProcesses)
- type HTTPBasedCheckerPolicyItemWindows
- type HTTPBasedCheckerProcessInfo
- type ProcessBasedChecker
- func (r *ProcessBasedChecker[V]) Check(ctx base.CheckContext, metricsAppender *base.MetricsAppender) []base.ThresholdCause
- func (r *ProcessBasedChecker[V]) Close() error
- func (r *ProcessBasedChecker[V]) Fetch() error
- func (r *ProcessBasedChecker[V]) SyncPolicies(policies []*base.SyncPolicyWithProcesses)
- type ProcessBasedInfo
- type ProcessBasedPolicy
- type ProcessInfo
- type SingleValueCause
- type SystemBasedChecker
- func (s *SystemBasedChecker[V]) Check(ctx base.CheckContext, metricsAppender *base.MetricsAppender) []base.ThresholdCause
- func (s *SystemBasedChecker[V]) Close() error
- func (s *SystemBasedChecker[V]) Fetch() error
- func (s *SystemBasedChecker[V]) SyncPolicies(policies []*base.SyncPolicyWithProcesses)
- type SystemBasedPolicy
- type URICause
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseChecker ¶
type BaseChecker[Info ProcessInfo] struct { InfoGenerator func(p api.ProcessInterface, older Info, items []*base.PolicyItem) Info PidWithInfos map[int32]Info }
BaseChecker contains the process with them self info Key: process pid Value: the process information, usually contains the time windows and policy items
func NewBaseChecker ¶
func NewBaseChecker[Info ProcessInfo](generator func(p api.ProcessInterface, older Info, items []*base.PolicyItem) Info) *BaseChecker[Info]
func (*BaseChecker[Info]) SyncPolicies ¶
func (c *BaseChecker[Info]) SyncPolicies(policies []*base.SyncPolicyWithProcesses, getEnabledItem func(items map[base.CheckType]*base.PolicyItem) *base.PolicyItem, notify func(key int32, isDelete bool))
type HTTPBasedChecker ¶
type HTTPBasedChecker[Data base.WindowData[network.BufferEvent, float64]] struct { *BaseChecker[*HTTPBasedCheckerProcessInfo] CheckType base.CheckType MonitorType v3.ContinuousProfilingTriggeredMonitorType ThresholdGenerate func(val string) (float64, error) }
func NewHTTPBasedChecker ¶
func NewHTTPBasedChecker[Data base.WindowData[network.BufferEvent, float64]](checkType base.CheckType, thresholdGenerator func(val string) (float64, error), dataGenerator func() base.WindowData[network.BufferEvent, float64], monitorType v3.ContinuousProfilingTriggeredMonitorType) *HTTPBasedChecker[Data]
func (*HTTPBasedChecker[Data]) Check ¶
func (n *HTTPBasedChecker[Data]) Check(ctx base.CheckContext, metricsAppender *base.MetricsAppender) []base.ThresholdCause
func (*HTTPBasedChecker[Data]) Close ¶
func (n *HTTPBasedChecker[Data]) Close() error
func (*HTTPBasedChecker[Data]) Fetch ¶
func (n *HTTPBasedChecker[Data]) Fetch() error
func (*HTTPBasedChecker[Data]) ReceiveBufferEvent ¶
func (n *HTTPBasedChecker[Data]) ReceiveBufferEvent(event network.BufferEvent)
func (*HTTPBasedChecker[Data]) SyncPolicies ¶
func (n *HTTPBasedChecker[Data]) SyncPolicies(policies []*base.SyncPolicyWithProcesses)
type HTTPBasedCheckerPolicyItemWindows ¶
type HTTPBasedCheckerPolicyItemWindows struct {
// contains filtered or unexported fields
}
type HTTPBasedCheckerProcessInfo ¶
type HTTPBasedCheckerProcessInfo struct { Process api.ProcessInterface PolicyWithWindows map[*base.PolicyItem]*HTTPBasedCheckerPolicyItemWindows }
type ProcessBasedChecker ¶
type ProcessBasedChecker[V numbers] struct { *BaseChecker[*ProcessBasedInfo[V]] CheckType base.CheckType MonitorType v3.ContinuousProfilingTriggeredMonitorType ThresholdGenerate func(val string) (V, error) DataGenerate func(process api.ProcessInterface) (V, error) }
func NewProcessBasedChecker ¶
func NewProcessBasedChecker[V numbers](checkType base.CheckType, thresholdGenerator func(val string) (V, error), dataGenerator func(p api.ProcessInterface) (V, error), monitorType v3.ContinuousProfilingTriggeredMonitorType) *ProcessBasedChecker[V]
func (*ProcessBasedChecker[V]) Check ¶
func (r *ProcessBasedChecker[V]) Check(ctx base.CheckContext, metricsAppender *base.MetricsAppender) []base.ThresholdCause
func (*ProcessBasedChecker[V]) Close ¶
func (r *ProcessBasedChecker[V]) Close() error
func (*ProcessBasedChecker[V]) Fetch ¶
func (r *ProcessBasedChecker[V]) Fetch() error
func (*ProcessBasedChecker[V]) SyncPolicies ¶
func (r *ProcessBasedChecker[V]) SyncPolicies(policies []*base.SyncPolicyWithProcesses)
type ProcessBasedInfo ¶
type ProcessBasedInfo[V numbers] struct { Process api.ProcessInterface Windows *base.TimeWindows[V, V] Policies []*ProcessBasedPolicy[V] }
type ProcessBasedPolicy ¶
type ProcessBasedPolicy[V numbers] struct { Threshold V Policy *base.PolicyItem }
type ProcessInfo ¶
type ProcessInfo interface { }
type SingleValueCause ¶
type SingleValueCause struct {
// contains filtered or unexported fields
}
func NewSingleValueCause ¶
func NewSingleValueCause(p api.ProcessInterface, policyItem *base.PolicyItem, monitorType v3.ContinuousProfilingTriggeredMonitorType, threshold, current float64) *SingleValueCause
func (*SingleValueCause) FromPolicy ¶
func (p *SingleValueCause) FromPolicy() *base.PolicyItem
func (*SingleValueCause) GenerateTransferCause ¶
func (p *SingleValueCause) GenerateTransferCause() *v3.ContinuousProfilingCause
func (*SingleValueCause) Process ¶
func (p *SingleValueCause) Process() api.ProcessInterface
type SystemBasedChecker ¶
type SystemBasedChecker[V numbers] struct { CheckType base.CheckType MonitorType v3.ContinuousProfilingTriggeredMonitorType ThresholdGenerate func(val string) (V, error) DataGenerate func() (V, error) GlobalWindows *base.TimeWindows[V, V] Policies []*SystemBasedPolicy[V] }
func NewSystemBasedChecker ¶
func NewSystemBasedChecker[V numbers](checkType base.CheckType, thresholdGenerator func(val string) (V, error), dataGenerator func() (V, error), monitorType v3.ContinuousProfilingTriggeredMonitorType) *SystemBasedChecker[V]
func (*SystemBasedChecker[V]) Check ¶
func (s *SystemBasedChecker[V]) Check(ctx base.CheckContext, metricsAppender *base.MetricsAppender) []base.ThresholdCause
func (*SystemBasedChecker[V]) Close ¶
func (s *SystemBasedChecker[V]) Close() error
func (*SystemBasedChecker[V]) Fetch ¶
func (s *SystemBasedChecker[V]) Fetch() error
func (*SystemBasedChecker[V]) SyncPolicies ¶
func (s *SystemBasedChecker[V]) SyncPolicies(policies []*base.SyncPolicyWithProcesses)
type SystemBasedPolicy ¶
type SystemBasedPolicy[V numbers] struct { Threshold V Policy *base.PolicyItem Processes []api.ProcessInterface }
type URICause ¶
func NewURICause ¶
func NewURICause(p api.ProcessInterface, isRegex bool, uri string, policyItem *base.PolicyItem, monitorType v3.ContinuousProfilingTriggeredMonitorType, threshold, current float64) *URICause
func (*URICause) FromPolicy ¶
func (p *URICause) FromPolicy() *base.PolicyItem
func (*URICause) GenerateTransferCause ¶
func (p *URICause) GenerateTransferCause() *v3.ContinuousProfilingCause
func (*URICause) Process ¶
func (p *URICause) Process() api.ProcessInterface
Click to show internal directories.
Click to hide internal directories.