config

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2019 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIServer

type APIServer struct {
	TLS struct {
		Enabled     bool   `json:"enabled"`
		Certificate string `json:"certificate"`
		Key         string `json:"key"`
	} `json:"tls"`
	BindAddress   string `json:"bind_address"`
	Port          int    `json:"port"`
	ReadTimeoutS  int    `json:"read_timeout_s"`
	WriteTimeoutS int    `json:"write_timeout_s"`
}

func (APIServer) Server added in v0.0.9

func (s APIServer) Server(mux http.Handler) (*http.Server, error)

type Configuration

type Configuration struct {
	APIServer     APIServer    `json:"api_server"`
	Registry      Registry     `json:"registry"`
	Statsd        stats.Statsd `json:"statsd"`
	ModuleStorage Storage      `json:"module_storage"`
	Transforms    Transforms   `json:"transforms"`
}

func (Configuration) String

func (c Configuration) String() string

type Registry

type Registry struct {
	Instances       instances `json:"instances"`
	PollFrequencyS  int       `json:"poll_frequency_s"`
	RequestTimeoutS int       `json:"request_timeout_s"`
	APIKey          string    `json:"api_key"`
}

type Storage

type Storage struct {
	DataPath  string `json:"data_path"`
	IndexPath string `json:"index_path"`
	TmpPath   string `json:"tmp_path"`
}

type Transforms

type Transforms struct {
	AutomaticRedirect bool `json:"auto_redirect"`
	DomainGoGet       []struct {
		Domain string `json:"domain"`
	} `json:"domain_go-get,omitempty"`
	DomainRedirects []struct {
		Original     string `json:"original"`
		Substitution string `json:"substitution"`
	} `json:"domain_redirects,omitempty"`
	DomainHeaders []struct {
		Domain  string            `json:"domain"`
		Headers map[string]string `json:"headers"`
	} `json:"domain_headers,omitempty"`
	DomainPath []struct {
		Domain string `json:"domain"`
		Path   string `json:"path"`
	} `json:"domain_paths,omitempty"`
	DomainTransport []struct {
		Domain    string `json:"domain"`
		Transport string `json:"transport"`
	} `json:"domain_transports,omitempty"`
}

Jump to

Keyboard shortcuts

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