telemetry

package
v0.0.0-...-0af3362 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection interface {
	Get(id string) (string, error)
	GetMany(id []string) (map[string]string, error)
	Set(id string, value string) error
}

func DialSNMP

func DialSNMP(username, password, community, ip string, version int) Connection

Creating the SNMP Connection Object

type Devices

type Devices map[string]device

func (Devices) AddDevice

func (tm Devices) AddDevice(devName, protocol string, protocolOpt ProtocolOptType) device

func (Devices) RegisterDeviceParams

func (tm Devices) RegisterDeviceParams(devName string, oids []string)

Register Which Parameter of the device needs to read/write

func (Devices) Subscribe

func (tm Devices) Subscribe(topic string) (<-chan gear.Message, error)

Create a Subscription upon on the name of topic : <device name>/<oid>/<optional interval in seconds> e.g : dev1/1.2.1.4.5.1.2/100 or testdev/1.2.1.4.2.1

func (Devices) Unsubscribe

func (tm Devices) Unsubscribe(topic string) error

type ProtocolOptType

type ProtocolOptType struct {
	Username, Password, Community, Ip, Version string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL