Documentation ¶
Overview ¶
Package common contains constants and basic structures used in snmp integration
Index ¶
Constants ¶
const SnmpExternalTagsSourceType = "snmp"
SnmpExternalTagsSourceType is the source id used for external tags
const SnmpIntegrationName = "snmp"
SnmpIntegrationName is the name of the snmp integration
Variables ¶
var MockTimeNow = func() time.Time { layout := "2006-01-02 15:04:05" str := "2000-01-01 00:00:00" t, _ := time.Parse(layout, str) return t }
MockTimeNow mocks time.Now
Functions ¶
Types ¶
type OIDTrie ¶
OIDTrie is a trie structure that represent OIDs as tree It's an efficient data structure for verifying if an OID is known or not. The search complexity of NonLeafNodeExist / LeafExist methods are O(n), where n is the length of the OID (number of dot separated numbers). The search complexity doesn't depend on the size of the trie.
func BuildOidTrie ¶
BuildOidTrie builds the OIDTrie from a list of OIDs
func (*OIDTrie) DebugPrint ¶
func (o *OIDTrie) DebugPrint()
DebugPrint is used to print the whole Trie for debugging purpose
func (*OIDTrie) NonLeafNodeExist ¶
NonLeafNodeExist checks if the oid is a known node (a node have at least one child)