Documentation ¶
Overview ¶
Package oidresolver resolves OIDs
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsValidOID ¶
IsValidOID returns true if value looks like a valid OID. An OID is made of digits and dots, but OIDs do not end with a dot and there are always digits between dots.
func NormalizeOID ¶
NormalizeOID converts an OID from the absolute form ".1.2.3..." to a relative form "1.2.3..."
Types ¶
type Component ¶
type Component interface { GetTrapMetadata(trapOID string) (TrapMetadata, error) GetVariableMetadata(trapOID string, varOID string) (VariableMetadata, error) }
Component is a interface to get Trap and Variable metadata from OIDs
type TrapDBFileContent ¶
type TrapDBFileContent struct { Traps TrapSpec `yaml:"traps" json:"traps"` Variables VariableSpec `yaml:"vars" json:"vars"` }
TrapDBFileContent contains data for the traps and variables from a trap db file.
type TrapMetadata ¶
type TrapMetadata struct { Name string `yaml:"name" json:"name"` MIBName string `yaml:"mib" json:"mib"` Description string `yaml:"descr" json:"descr"` VariableSpecPtr VariableSpec `yaml:"-" json:"-"` }
TrapMetadata is the MIB-extracted information of a given trap OID. It also contains a reference to the variableSpec that was defined in the same trap db file. This is to prevent variable conflicts and to give precedence to the variable definitions located] in the same trap db file as the trap.
type TrapSpec ¶
type TrapSpec map[string]TrapMetadata
TrapSpec contains the variableMetadata for each known trap in all trap db files
type VariableMetadata ¶
type VariableMetadata struct { Name string `yaml:"name" json:"name"` Description string `yaml:"descr" json:"descr"` Enumeration map[int]string `yaml:"enum" json:"enum"` Bits map[int]string `yaml:"bits" json:"bits"` IsIntermediateNode bool `yaml:"-" json:"-"` }
VariableMetadata is the MIB-extracted information of a given trap variable
type VariableSpec ¶
type VariableSpec map[string]VariableMetadata
VariableSpec contains the variableMetadata for each known variable of a given trap db file
Directories ¶
Path | Synopsis |
---|---|
Package oidresolverimpl implements the OID Resolver component.
|
Package oidresolverimpl implements the OID Resolver component. |