Documentation ¶
Overview ¶
* Copyright (c) 2020. Liero AB * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the Software * is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Index ¶
Constants ¶
const ( APP_NAME string = "liero-snmpc" Version1 SnmpVersion = 0x0 Version2c SnmpVersion = 0x1 Version3 SnmpVersion = 0x3 DEFAULT_TIMEOUT time.Duration = time.Second * 5 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type C ¶
type C struct { Community string `json:"community" hcl:"community,optional"` Version uint8 `json:"version" hcl:"version,optional"` Port uint16 `json:"port" hcl:"port,optional"` Timeout znet.Duration `json:"timeout" hcl:"timeout,optional"` Retries int `json:"retries" hcl:"retries,optional"` MaxIterations int `json:"max_iterations" hcl:"max_iterations,optional"` MaxRepetitions MaxReps `json:"max_repetitions" hcl:"max_repetitions,optional"` NonRepeaters int `json:"non_repeaters" hcl:"non_repeaters,optional"` DynamicRepetitions bool `json:"dynamic_repetitions" hcl:"dynamic_repetitions,optional"` }
Configuration for SNMP
type Cache ¶
type Cache interface { Pop(host string) Connection BulkGet(host string, oids []string, cfg C) (result *gosnmp.SnmpPacket, err error) Get(host string, oids []string, cfg C) (result *gosnmp.SnmpPacket, err error) Walk(host string, rootOid string, cfg C) (results []gosnmp.SnmpPDU, err error) // contains filtered or unexported methods }
type Connection ¶
type SnmpVersion ¶
type SnmpVersion uint8