config

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2024 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

Package config provides a way to parse a YAML configuration file into a list of services.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ServiceConfig serviceConfig  `yaml:"services"`
	LogConfig     logging.Config `yaml:"log"`
	ReadTimeout   time.Duration  `yaml:"readTimeout"`
}

Config represents a listing of services to proxy.

func New

func New(data []byte) (*Config, error)

New parses the given YAML data into a Config.

func (*Config) Services

func (c *Config) Services(docker dockerapi.Docker) (map[string]*services.Service, error)

Services parses the config and returns a mapping from hosts to services.

func (*Config) TLSHosts

func (c *Config) TLSHosts() []string

TLSHosts returns a list of hosts that require TLS.

Jump to

Keyboard shortcuts

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