Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetConfigurationDirectory ¶
GetConfigurationDirectory returns the directory where all state is stored
func InitializeEnvironment ¶
func InitializeEnvironment(options ...EnvironmentOption)
InitializeEnvironment initializes the environment with the specified options
func SaveConfiguration ¶
func SaveConfiguration(toSave Configuration) error
SaveConfiguration saves a configuration to the file
Types ¶
type Configuration ¶
type Configuration struct {
// BaseDirectories stores all the places where configuration files can be found
BaseDirectories []string
}
Configuration stores general configuration for the proxy
func LoadConfiguration ¶
func LoadConfiguration() (*Configuration, error)
LoadConfiguration loads the current user configuration
type Environment ¶
Environment stores information about the runtime
func GetEnvironment ¶
func GetEnvironment() Environment
GetEnvironment returns the current runtime environment
type EnvironmentOption ¶
type EnvironmentOption func(*Environment)
EnvironmentOption represents an option to be applied on the environment
func WithAdminPort ¶
func WithAdminPort(port int) EnvironmentOption
WithAdminPort configuration option to setup an Admin server and UI port
func WithCertificateFile ¶
func WithCertificateFile(pathToCertFile string) EnvironmentOption
WithCertificateFile configuration option to setup the certificate file to use for TLS
func WithKeyFile ¶
func WithKeyFile(pathToKeyFile string) EnvironmentOption
WithKeyFile configuration option to setup the key file to use for TLS
func WithProxyPort ¶
func WithProxyPort(port int) EnvironmentOption
WithProxyPort configuration option to setup the proxy port