config

package
v0.7.6 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2015 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultHost = "0.0.0.0"
	DefaultPort = "2015"
	DefaultRoot = "."

	// DefaultConfigFile is the name of the configuration file that is loaded
	// by default if no other file is specified.
	DefaultConfigFile = "Caddyfile"
)

Variables

View Source
var (
	Root = DefaultRoot
	Host = DefaultHost
	Port = DefaultPort
)

These three defaults are configurable through the command line

Functions

func NewDefault added in v0.7.5

func NewDefault() server.Config

Types

type Group added in v0.7.5

type Group map[*net.TCPAddr][]server.Config

func Default

func Default() (Group, error)

Default makes a default configuration which is empty except for root, host, and port, which are essentials for serving the cwd.

func Load

func Load(filename string, input io.Reader) (Group, error)

Load reads input (named filename) and parses it, returning server configurations grouped by listening address.

type SetupFunc added in v0.7.2

type SetupFunc func(c *setup.Controller) (middleware.Middleware, error)

A setup function takes a setup controller. Its return values may both be nil. If middleware is not nil, it will be chained into the HTTP handlers in the order specified in this package.

Directories

Path Synopsis
Package parse provides facilities for parsing configuration files.
Package parse provides facilities for parsing configuration files.

Jump to

Keyboard shortcuts

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