Help us shape the future of Go! Take the 2026 Go Developer Survey

config

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2022 License: MIT Imports: 4 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version = "v0.6-dev"

Functions

This section is empty.

Types

type Config

type Config struct {
	RollbarToken   string
	GoEnv          string `default:"development"`
	Version        string `ignore:"true"`
	NetnsPrefix    string `default:"sc-ns-"`
	NetnsPath      string `default:"/var/run/netns"`
	HttpPort       int    `default:"9999"`
	PublicHostname string `envconfig:"PUBLIC_HOSTNAME"`
	PublicIP       string `envconfig:"PUBLIC_IP"`

	EtcdPrefix    string `default:"/sc-net"`
	EtcdHosts     string `envconfig:"ETCD_HOSTS" default:"http://127.0.0.1:2379"`
	EtcdTLSCACert string `envconfig:"ETCD_CACERT"`
	EtcdTLSKey    string `envconfig:"ETCD_TLS_KEY"`
	EtcdTLSCert   string `envconfig:"ETCD_TLS_CERT"`

	HttpTLSCert string `envconfig:"HTTP_TLS_CERT"`
	HttpTLSKey  string `envconfig:"HTTP_TLS_KEY"`
	HttpTLSCA   string `envconfig:"HTTP_TLS_CA"`

	EnableDockerPlugin   bool `envconfig:"ENABLE_DOCKER_PLUGIN"`
	DockerPluginHttpPort int  `default:"9998"`
}

func Build

func Build() (*Config, error)

func (*Config) CreateDirectories

func (c *Config) CreateDirectories() error

func (*Config) IsHttpTLSEnabled added in v0.5.3

func (c *Config) IsHttpTLSEnabled() bool

Jump to

Keyboard shortcuts

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