configure

package
v0.0.0-...-a3451e6 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2019 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultConfig = `` /* 345-byte string literal not displayed */

DefaultConfig is the default configuration that is used when a configuration file is not found.

Variables

This section is empty.

Functions

func Certificates

func Certificates()

Certificates loads the local certificate pairs if they exist or generates new ones on-the-fly.

func DeleteDatabase

func DeleteDatabase(db string) error

DeleteDatabase deletes the database at the file path specified.

func HostInWhitelist

func HostInWhitelist(host string) bool

HostInWhitelist returns true if the host is in the whitelist of the configuration file or is the tracy server.Used to block the development servers.

func ParseServer

func ParseServer(hp string) (*types.Server, error)

ParseServer parses a string of the form <host>:<port> into a types.Server object where the <host> is resolved to a set of IP addresses.

func ProxyServer

ProxyServer configures the TCP listener based on the user's configuration.

func Setup

func Setup()

Setup unmarshals the configuration file into valid data structures that can be easily digested at runtime.

Types

type Configuration

type Configuration struct {
	TracerStrings            map[string]string `json:TracerStrings`
	ServerWhitelist          []*types.Server
	TracyServer              *types.Server
	AutoLaunch               bool `json:AutoLaunch`
	PublicKeyLocation        string
	PrivateKeyLocation       string
	DebugUI                  bool
	CertCachePath            string
	DatabasePath             string
	TracyPath                string
	Version                  string `json:Version`
	SigningCertificate       *tls.Certificate
	ExternalProxyServer      *url.URL
	LogReusedHTTPConnections bool
	ExternalHostname         string
}

Configuration is a struct that holds the configration options for the environment. This is a read-only struct and shouldn't be modified at runtime.

var Current Configuration

Current holds all the configuration options for the current environment.

Jump to

Keyboard shortcuts

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