Documentation ¶
Index ¶
- func AddEntryToIPSet(setName string)
- func CreateTelemetryHandle(version, aiMetadata string) error
- func DecNumACLRules()
- func DecNumIPSets()
- func DecNumPolicies()
- func DeleteIPSet(setName string)
- func GetACLRuleExecCount() (int, error)
- func GetHandler(isNodeLevel bool) http.Handler
- func GetIPSetExecCount() (int, error)
- func GetNumACLRules() (int, error)
- func GetNumEntriesForIPSet(setName string) (int, error)
- func GetNumIPSetEntries() (int, error)
- func GetNumIPSets() (int, error)
- func GetNumPolicies() (int, error)
- func GetPolicyExecCount() (int, error)
- func IncNumACLRules()
- func IncNumIPSets()
- func IncNumPolicies()
- func InitializeAll()
- func NumIPSetsIsPositive() bool
- func RecordACLRuleExecTime(timer *Timer)
- func RecordIPSetExecTime(timer *Timer)
- func RecordPolicyExecTime(timer *Timer)
- func ReinitializeAll()
- func RemoveAllEntriesFromIPSet(setName string)
- func RemoveEntryFromIPSet(setName string)
- func ResetIPSetEntries()
- func ResetNumACLRules()
- func ResetNumIPSets()
- func ResetNumPolicies()
- func SendErrorLogAndMetric(operationID int, format string, args ...interface{})
- func SendLog(report aitelemetry.Report)
- func SendMetric(metric aitelemetry.Metric)
- func SetNumIPSets(val int)
- type Timer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddEntryToIPSet ¶
func AddEntryToIPSet(setName string)
AddEntryToIPSet increments the number of entries for IPSet setName. It doesn't ever update the number of IPSets.
func CreateTelemetryHandle ¶
CreateTelemetryHandle creates a handler to initialize AI telemetry
func DeleteIPSet ¶
func DeleteIPSet(setName string)
DeleteIPSet decrements the number of IPSets and resets the number of entries for ipset setName to 0.
func GetACLRuleExecCount ¶
GetACLRuleExecCount returns the number of observations for execution time of adding ACL rules. This function is slow.
func GetHandler ¶
GetHandler returns the HTTP handler for the metrics endpoint
func GetIPSetExecCount ¶
GetIPSetExecCount returns the number of observations for execution time of adding IPSets. This function is slow.
func GetNumACLRules ¶
GetNumACLRules returns the number of ACL rules. This function is slow.
func GetNumEntriesForIPSet ¶
GetNumEntriesForIPSet returns the number entries for IPSet setName. This function is slow. TODO could use the map if this function needs to be faster. If updated, replace GetNumEntriesForIPSet() with getVecValue() in assertEqualMapAndMetricElements() in ipsets_test.go
func GetNumIPSetEntries ¶
GetNumIPSetEntries returns the total number of IPSet entries. This function is slow.
func GetNumIPSets ¶
GetNumIPSets returns the number of IPSets. This function is slow.
func GetNumPolicies ¶
GetNumPolicies returns the number of policies. This function is slow.
func GetPolicyExecCount ¶ added in v1.4.13
GetPolicyExecCount returns the number of observations for execution time of adding policies. This function is slow.
func InitializeAll ¶
func InitializeAll()
InitializeAll creates all the Prometheus Metrics. The metrics will be nil before this method is called.
func NumIPSetsIsPositive ¶
func NumIPSetsIsPositive() bool
NumIPSetsIsPositive is true when the number of IPSets is positive. This function is slow. TODO might be more efficient to keep track of the count
func RecordACLRuleExecTime ¶
func RecordACLRuleExecTime(timer *Timer)
RecordACLRuleExecTime adds an observation of execution time for adding an ACL rule. The execution time is from the timer's start until now.
func RecordIPSetExecTime ¶
func RecordIPSetExecTime(timer *Timer)
RecordIPSetExecTime adds an observation of execution time for adding an IPSet. The execution time is from the timer's start until now.
func RecordPolicyExecTime ¶ added in v1.4.13
func RecordPolicyExecTime(timer *Timer)
RecordPolicyExecTime adds an observation of execution time for adding a policy. The execution time is from the timer's start until now.
func ReinitializeAll ¶
func ReinitializeAll()
ReinitializeAll creates/replaces Prometheus metrics. This function is intended for UTs. Be sure to reset helper variables e.g. ipsetInventoryMap.
func RemoveAllEntriesFromIPSet ¶
func RemoveAllEntriesFromIPSet(setName string)
RemoveAllEntriesFromIPSet sets the number of entries for ipset setName to 0. It doesn't ever update the number of IPSets.
func RemoveEntryFromIPSet ¶
func RemoveEntryFromIPSet(setName string)
RemoveEntryFromIPSet decrements the number of entries for IPSet setName.
func ResetIPSetEntries ¶
func ResetIPSetEntries()
ResetIPSetEntries sets the number of entries to 0 for all IPSets. It doesn't ever update the number of IPSets.
func SendErrorLogAndMetric ¶
SendErrorLogAndMetric is responsible for sending log and error metrics through AI telemetry