collector

package
v0.0.0-...-9b9f36b Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2016 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ConnectRetries says how many times the client should retry a failed connection
	ConnectRetries = 5
	// ConnectRetryDelay says how long the client should wait between retries
	ConnectRetryDelay = time.Second
)

Functions

This section is empty.

Types

type AppStorage

type AppStorage interface {
	Add(eui types.AppEUI) error
	Remove(eui types.AppEUI) error
	SetAccessKey(eui types.AppEUI, key string) error
	GetAccessKey(eui types.AppEUI) (string, error)
	List() ([]types.AppEUI, error)
	Reset() error
	Close() error
}

AppStorage provides storage for applications

func ConnectRedis

func ConnectRedis(addr string, db int64) (AppStorage, error)

ConnectRedis connects to Redis using the specified options

type Collector

type Collector interface {
	Start() (map[types.AppEUI]collection.AppCollector, error)
	Stop()
	StopApp(eui types.AppEUI) error
}

Collector collects data from the Handler and stores it

func NewCollector

func NewCollector(ctx log.Interface, appStorage AppStorage, broker string, dataStorage collection.DataStorage, netAddr string) Collector

NewCollector creates a new collector

type StartError

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

StartError contains errors of starting applications

func (StartError) Error

func (e StartError) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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