Documentation ¶
Overview ¶
Copyright 2019 Cisco Systems, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MIBHandler ¶
func (*MIBHandler) LoadCacheFromFile ¶
func (mh *MIBHandler) LoadCacheFromFile(path string) error
func (*MIBHandler) LoadJSONFromDir ¶
func (mh *MIBHandler) LoadJSONFromDir(path string) error
func (*MIBHandler) LoadJSONFromFile ¶
func (mh *MIBHandler) LoadJSONFromFile(path string) error
func (*MIBHandler) WriteCacheToFile ¶
func (mh *MIBHandler) WriteCacheToFile(path string) error
type MIBHandlerer ¶
type MIBHandlerer interface { // Load MIBs from a JSON file LoadJSONFromFile(path string) error // Load MIBs from JSON files placed in a dir LoadJSONFromDir(dir string) error // Load MIBs from cache LoadCacheFromFile(path string) error // Save MIBs cached into a file WriteCacheToFile(path string) error }
Load MIBs from different inputs and write
type MIBRegistry ¶
type MIBRegistry struct {
// contains filtered or unexported fields
}
MIBRegistry keeps the data for building the (OID, strings) map
func (*MIBRegistry) Load ¶
func (mib *MIBRegistry) Load(src map[string]of.MIB) error
Load given map[oid]MIB into registry.
func (*MIBRegistry) ShortString ¶
func (mib *MIBRegistry) ShortString(oid string) string
Return the last node to its name. Ex: 1.3.6.1.2.1.11.19 -> snmpInTraps.
func (*MIBRegistry) String ¶
func (mib *MIBRegistry) String(oid string) string
Return display string for given OID.