caddy

package
v2.0.4+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2019 License: AGPL-3.0 Imports: 28 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultConfig = &Config{
		Agreed:                  true,
		CAUrl:                   certmagic.Default.CA,
		CATimeout:               int64(certmagic.HTTPTimeout),
		DisableHTTPChallenge:    certmagic.Default.DisableHTTPChallenge,
		DisableTLSALPNChallenge: certmagic.Default.DisableTLSALPNChallenge,
		ServerType:              `http`,
		CPU:                     `100%`,
		PidFile:                 `./caddy.pid`,
	}
	DefaultVersion = `2.0.0`
	EnableReload   = true
)

Functions

func Fixed

func Fixed(c *Config)

func LoadEnvFromFile

func LoadEnvFromFile(envFile string) error

LoadEnvFromFile loads additional envs if file provided and exists Envs in file should be in KEY=VALUE format

func ParseEnvFile

func ParseEnvFile(envInput io.Reader) (map[string]string, error)

ParseEnvFile implements parse logic for environment files

func TrapSignals

func TrapSignals()

Types

type Config

type Config struct {
	Agreed                  bool   `json:"agreed"` //Agree to the CA's Subscriber Agreement
	CAUrl                   string `json:"caURL"`  //URL to certificate authority's ACME server directory
	DisableHTTPChallenge    bool   `json:"disableHTTPChallenge"`
	DisableTLSALPNChallenge bool   `json:"disableTLSALPNChallenge"`
	Caddyfile               string `json:"caddyFile"`  //Caddyfile to load (default caddy.DefaultConfigFile)
	CPU                     string `json:"cpu"`        //CPU cap
	CAEmail                 string `json:"caEmail"`    //Default ACME CA account email address
	CATimeout               int64  `json:"caTimeout"`  //Default ACME CA HTTP timeout
	LogFile                 string `json:"logFile"`    //Process log file
	PidFile                 string `json:"-"`          //Path to write pid file
	Quiet                   bool   `json:"quiet"`      //Quiet mode (no initialization output)
	Revoke                  string `json:"revoke"`     //Hostname for which to revoke the certificate
	ServerType              string `json:"serverType"` //Type of server to run

	//---
	EnvFile string `json:"envFile"` //Path to file with environment variables to load in KEY=VALUE format
	Plugins bool   `json:"plugins"` //List installed plugins
	Version bool   `json:"version"` //Show version
	// contains filtered or unexported fields
}

func (*Config) Init

func (c *Config) Init() *Config

func (*Config) Restart

func (c *Config) Restart() error

func (*Config) Start

func (c *Config) Start() error

func (*Config) Stop

func (c *Config) Stop() error

Jump to

Keyboard shortcuts

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