config

package
v0.0.0-...-736080c Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

config is responsible for managing the config of the system and presenting that to comm in a controlled way. For the purposes of the POC, it is mostly hardcoded in its implementation. In practice, this pkg should handle things like validation, and file loading/parsing, in addition to env var loading for things like secret credentials.

Index

Constants

View Source
const (
	ConfigEnvVar     = "KORE_CONFIG"
	PluginDirEnvVar  = "KORE_PLUGIN_DIR"
	AdapterDirEnvVar = "KORE_ADAPTER_DIR"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter struct {
	Dir     string
	Enabled []string
}

type Config

type Config struct {
	Engine   `yaml:"engine"`
	Plugins  Plugin  `yaml:"plugins"`
	Adapters Adapter `yaml:"adapters"`
}

func New

func New() (*Config, error)

func (*Config) GetAdapter

func (c *Config) GetAdapter() Adapter

func (*Config) GetEngine

func (c *Config) GetEngine() Engine

func (*Config) GetPlugin

func (c *Config) GetPlugin() Plugin

type Engine

type Engine struct {
	BufferSize uint
}

type Plugin

type Plugin struct {
	Dir     string
	Enabled []string
}

Jump to

Keyboard shortcuts

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