config

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	Routes   map[string]*Route `yaml:"routes"`
	Reset    string            `yaml:"reset"`
	Status   string            `yaml:"status"`
	Cert     string            `yaml:"cert"`
	CertPath string            `yaml:"cert_path"`
	Key      string            `yaml:"key"`
	KeyPath  string            `yaml:"key_path"`
	CA       string            `yaml:"ca"`
	CAPath   string            `yaml:"ca_path"`
	// contains filtered or unexported fields
}

File represents all the configurable options of Avenues

func ParseFromFile

func ParseFromFile() (*File, error)

ParseFromFile reads an Avenues config file from the file specified in the environment or from the default file location if no environment is specified. A File with the populated values is returned and any errors encountered while trying to read the file.

func (*File) ServeHTTP added in v0.1.0

func (f *File) ServeHTTP(w http.ResponseWriter, req *http.Request)

type Route added in v0.1.0

type Route struct {
	Type    string `yaml:"type"`
	Backend string `yaml:"backend,omitempty"`

	Backends []string `yaml:"backends,omitempty"`
	// contains filtered or unexported fields
}

Route represents a backing route to direct a request to

Jump to

Keyboard shortcuts

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