meraki

package
v0.0.0-...-72c0a3b Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2017 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

View Source
const (
	BaseUrlDefaut           = "https://dashboard.meraki.com/api/"
	APIVersionDefaut        = "v0"
	APIScrapFrequencyDefaut = time.Duration(5 * time.Second)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Addr       string            // The address to listen on for HTTP requests.
	BaseUrl    *url.URL          // the Meraki Dashboard API Base Url
	APIVersion string            // the Meraki Dashboard API version
	Tokens     []string          // list of Meraki Dashboard API token
	Freq       time.Duration     // the scraping frequency
	Labels     map[string]string // Labels added automaticaly to all metrics
}

Config used to store the exporter configuration

func NewConfig

func NewConfig() *Config

NewConfig returns a new Config instance

func (*Config) Init

func (c *Config) Init() error

Init used to initialize the configuration

type Exporter

type Exporter struct {
	// contains filtered or unexported fields
}

Exporter represent the Meraki exporter

func NewExporter

func NewExporter(config *Config) *Exporter

NewExporter return new Exporter instance

func (*Exporter) InitExporter

func (e *Exporter) InitExporter() error

InitExporter used to init the exporter resources

func (*Exporter) ListenAndServe

func (e *Exporter) ListenAndServe() error

ListenAndServe listens on the TCP network address addr and then calls Serve with handler to handle requests on incoming connections.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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