nginx

package
v0.0.0-...-9dacc49 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2016 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsRunning

func IsRunning(pidFile string) (bool, error)

IsRunning return true if nginx is running, false otherwise. A missing pid file is not considered an error

func Reload

func Reload(prefixPath, configFilePath string) error

func Stage

func Stage(deployment *client.Deployment) (string, *client.DeploymentError)

Stage unzip, process templates, and validate the deployment. returns directory, DeploymentError if directory returned is not empty (may be non-empty even if error), client is responsible for cleanup

func Start

func Start(prefixPath, configFilePath string, startTimeout time.Duration) error

Start Start the nginx process with the prefix path, the config file path, and the start timeout. If the start timeout elapses, a timeoutError will be thrown

func Stop

func Stop(prefixPath string) error

func Template

func Template(deploymentDir string, deployment *client.Deployment) *client.DeploymentError

func TestConfig

func TestConfig(prefixPath, configFile string) error

TestConfig Test the configuration of the nginx file. Will return an error if an error or warning is detected

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager The config manager

func NewManager

func NewManager(apiClient client.ApidClient, stageManager StageManager, nginxWorkDir string, nginxPidFile string, pollTimeout int) *Manager

NewManager Create a new instance of the configuration manager

func (*Manager) ApplyDeployment

func (manager *Manager) ApplyDeployment() error

ApplyDeployment Runs once, attempting to apply the latest deployment from the bundle cache. May return an execution error if there is a problem executing

type StageManager

type StageManager interface {
	Stage(deployment *client.Deployment) (deploymentDir string, err *client.DeploymentError)
}

StageManager the manager for staging a deployment

type StageManagerImpl

type StageManagerImpl struct {
}

StageManagerImpl impl placeholder impelemntation

func (*StageManagerImpl) Stage

func (stageManager *StageManagerImpl) Stage(deployment *client.Deployment) (deploymentDir string, err *client.DeploymentError)

Stage stage the manager

type StartError

type StartError struct {
	StdOut string
	StdErr string
	Err    error
}

StartError an error where we failed to start nginx

func (*StartError) Error

func (e *StartError) Error() string

Jump to

Keyboard shortcuts

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