sensor_example

package
v0.0.0-...-7a46cad Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2016 License: GPL-3.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package sensor_example implements a simple sensor that can be used as a template.

In general your sensor should have:

(a) a Sensor struct (can be empty) that implements the Scrape() function. (b) a function with a signature like NewSensor() which creates a new sensor. (c) use the init() function to register itself to the main package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSensor

func NewSensor(opts string) (sensor.Collector, error)

Types

type Sensor

type Sensor struct {
	Id int
}

func (Sensor) Scrape

func (s Sensor) Scrape() (out string, e error)

Jump to

Keyboard shortcuts

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