Documentation
¶
Index ¶
- func IsRunning(pidFile string) (bool, error)
- func Reload(prefixPath, configFilePath string) error
- func Stage(deployment *client.Deployment) (string, *client.DeploymentError)
- func Start(prefixPath, configFilePath string, startTimeout time.Duration) error
- func Stop(prefixPath string) error
- func Template(deploymentDir string, deployment *client.Deployment) *client.DeploymentError
- func TestConfig(prefixPath, configFile string) error
- type Manager
- type StageManager
- type StageManagerImpl
- type StartError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsRunning ¶
IsRunning return true if nginx is running, false otherwise. A missing pid file is not considered an 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 ¶
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 Template ¶
func Template(deploymentDir string, deployment *client.Deployment) *client.DeploymentError
func TestConfig ¶
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 ¶
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 ¶
StartError an error where we failed to start nginx
func (*StartError) Error ¶
func (e *StartError) Error() string