config

package
v0.0.0-...-88424db Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2015 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package config contains the configuration file format for stenographer's main configuration file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	StenotypePath string
	Threads       []ThreadConfig
	Interface     string
	Flags         []string
	Port          int
	CertPath      string // Directory where client and server certs are stored.
}

Config is a json-decoded configuration for running stenographer.

func ReadConfigFile

func ReadConfigFile(filename string) (*Config, error)

ReadConfigFile reads in the given JSON encoded configuration file and returns the Config object associated with the decoded configuration data.

func (Config) Validate

func (c Config) Validate() error

Validate checks the configuration for common errors.

type ThreadConfig

type ThreadConfig struct {
	PacketsDirectory   string
	IndexDirectory     string
	DiskFreePercentage int `json:",omitempty"`
	MaxDirectoryFiles  int `json:",omitempty"`
}

ThreadConfig is a json-decoded configuration for each stenotype thread, detailing where it should store data and how much disk space it should keep available on each disk.

Jump to

Keyboard shortcuts

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