Documentation
¶
Overview ¶
The `nginx` task spawns an nginx server, and can test and reload the nginx configuration programmatically or through the API gateway.
Index ¶
- func New(c *Config) (*nginx, error)
- type Config
- func (c *Config) ConfigDir() (string, error)
- func (c *Config) DataDir() (string, error)
- func (Config) Description() string
- func (c Config) ExecFile() string
- func (c Config) Flags(configDir, prefix string) []string
- func (c Config) LogDir(configDir string) (string, error)
- func (Config) Name() string
- func (c Config) New() (server.Task, error)
- type Nginx
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { BinaryPath string `hcl:"binary_path" description:"Path to nginx binary"` ConfigPath string `hcl:"config" description:"Path to persistent configuration"` DataPath string `hcl:"data" description:"Path to ephermeral data directory"` LogPath string `hcl:"log" description:"Path to log directory"` LogRotate time.Duration `hcl:"log_rotate_period" description:"TODO: Period for log rotations (1d)"` LogKeep time.Duration `hcl:"log_keep_period" description:"TODO: Period for log deletions (28d)"` Env map[string]string `hcl:"env" description:"Environment variables to set"` Directives map[string]string `hcl:"directives" description:"Directives to set in nginx configuration"` // contains filtered or unexported fields }
func (Config) Description ¶
Description returns the description of the service
type Nginx ¶
type Nginx interface { // test the configuration and return an error if it fails Test() error // test the configuration and then reload it (the SIGHUP signal) Reload() error // reopen log files (the SIGUSR1 signal) Reopen() error // return the nginx version string Version() string // return the persistent config path ConfigPath() string // return the ephermeral data path DataPath() string // return logfile path LogPath() string }
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
Implements an API client for the nginx API (https://github.com/mutablelogic/go-server/pkg/handler/nginx)
|
Implements an API client for the nginx API (https://github.com/mutablelogic/go-server/pkg/handler/nginx) |
Manages the lifecycle of configuration folders for nginx
|
Manages the lifecycle of configuration folders for nginx |
Click to show internal directories.
Click to hide internal directories.