config

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2015 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package config provides data structure for storing resourced reader/writer configurations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Command        string
	GoStruct       string
	GoStructFields map[string]interface{}
	Path           string
	Interval       string

	// There are only 2 kinds: reader and writer
	Kind string

	// Writer specific fields
	// ReaderPaths defines input data endpoints for a Writer.
	ReaderPaths []string
}

Config is a unit of execution for a reader/writer. Reader config defines how to fetch a particular information and its JSON data path. Writer config defines how to export the JSON data to a particular destination. E.g. Facts/graphing database.

func NewConfig

func NewConfig(fullpath, kind string) (Config, error)

NewConfig creates Config struct given fullpath and kind.

type ConfigStorage

type ConfigStorage struct {
	Readers []Config
	Writers []Config
}

ConfigStorage stores all readers and writers configuration.

func NewConfigStorage

func NewConfigStorage(configReaderDir, configWriterDir string) (*ConfigStorage, error)

NewConfigStorage creates ConfigStorage struct given configReaderDir and configWriterDir.

Jump to

Keyboard shortcuts

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