config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2013 License: Apache-2.0 Imports: 4 Imported by: 207

Documentation

Index

Constants

View Source
const ChefVersion = "11.0.8"

The chef version we're at least aiming for, even if it's not complete yet

View Source
const Version = "0.2.0"

The goiardi version

Variables

View Source
var Config = InitConfig()

Functions

func ListenAddr

func ListenAddr() string

The address and port goiardi is configured to listen on.

func ParseConfigOptions

func ParseConfigOptions() error

Read and apply arguments from the command line.

func ServerBaseURL

func ServerBaseURL() string

The base URL

func ServerHostname

func ServerHostname() string

The hostname and port goiardi is configured to use.

Types

type Conf

type Conf struct {
	IPaddress  string
	Port       int
	Hostname   string
	ConfFile   string
	DebugLevel int
}

Master struct for configuration.

func InitConfig

func InitConfig() *Conf

type Options

type Options struct {
	Version   bool   `short:"v" long:"version" description: "Print version info."`
	Verbose   []bool `short:"V" long:"verbose" description:"Show verbose debug information. (not implemented)"`
	ConfFile  string `short:"c" long:"config" description:"Specify a config file to use. (not implemented)"`
	IPaddress string `short:"I" long:"ipaddress" description:"Listen on a specific IP address."`
	Hostname  string `short:"H" long:"hostname" description:"Hostname to use for this server. Defaults to hostname reported by the kernel."`
	Port      int    `short:"P" long:"port" description:"Port to listen on." default:4545`
}

Struct for command line options.

Jump to

Keyboard shortcuts

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