config

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

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

Go to latest
Published: May 25, 2017 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const Version = "0.0.1"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Node    NodeInfo           `mapstructure:"node" json:"node"`
	Inputs  []InputPluginInfo  `mapstructure:"input_plugin" json:"input_plugin"`
	Outputs []OutputPluginInfo `mapstructure:"output_plugin" json:"output_plugin"`
}

Config sturcture

func GetConfig

func GetConfig() *Config

Get singleton config

func NewConfig

func NewConfig() *Config

New Config

func (*Config) Init

func (config *Config) Init(path string) error

Init config from json file

type InputPluginInfo

type InputPluginInfo struct {
	Name         string            `mapstructure:"plugin_name" json:"plugin_name"`
	Path         string            `mapstructure:"plugin_path" json:"plugin_path"`
	Duration     int               `mapstructure:"duration" json:"duration"`
	Active       bool              `mapstructure:"active" json:"active"`
	PluginConfig map[string]string `mapstructure:"config" json:"config"`
}

Input plugin information

type NodeInfo

type NodeInfo struct {
	Name          string            `mapstructure:"name" json:"name"`
	IP            string            `mapstructure:"ip" json:"ip"`
	TransferQueue TransferQueueInfo `mapstructure:"transfer_queue" json:"transfer_queue"`
}

Node information

type OutputPluginInfo

type OutputPluginInfo struct {
	Name         string            `mapstructure:"plugin_name" json:"plugin_name"`
	Path         string            `mapstructure:"plugin_path" json:"plugin_path"`
	Active       bool              `mapstructure:"active" json:"active"`
	Inputs       map[string]bool   `mapstructure:"inputs" json:"inputs"`
	PluginConfig map[string]string `mapstructure:"config" json:"config"`
}

Output plugin information

type TransferQueueInfo

type TransferQueueInfo struct {
	BufferSize int `mapstructure:"buffer_size" json:"buffer_size"`
}

Transfer queue information

Jump to

Keyboard shortcuts

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