config

package
v0.0.0-...-65ed424 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2015 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseConfig

func ParseConfig(path string) ([]*model.Server, []*log.LogConfig, error)

Types

type Builder

type Builder struct {
	// contains filtered or unexported fields
}

type Config

type Config struct {
	Statsd struct {
		Url    string
		Prefix string
	}
	Servers []*Server
	Logging []*log.LogConfig
}

type Handler

type Handler struct {
	Id        string
	Path      string
	Responses []*Response
}

type HandlerFn

type HandlerFn func(http.ResponseWriter, *http.Request)

type Responder

type Responder struct {
	// contains filtered or unexported fields
}

func (*Responder) ServeHTTP

func (d *Responder) ServeHTTP(w http.ResponseWriter, req *http.Request)

type Response

type Response struct {
	Rate        string
	Code        int
	Body        string
	ContentType string
	Delay       string
	Drop        bool
}

type Server

type Server struct {
	Addr         string
	Path         string
	Handlers     []*Handler
	ReadTimeout  string
	WriteTimeout string
}

Jump to

Keyboard shortcuts

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