nginx

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cmd

func Cmd(cmd *exec.Cmd) error

Cmd process the logs for the passed Cmd object and outputs the logs within the nginx-wrapper logging configuration.

func New

func New(readers ...io.Reader)

New creates a new instance of a nginx wrapper log.

func RunCommand

func RunCommand(pm *ProcessMonitor, cmdPath string, args ...string) (*exec.Cmd, error)

RunCommand coordinates the run and shutdown of a binary executable at the specified path. The expectation is that this function will be executing an nginx instance.

func Start

func Start(binPath string, runPath string, configPath string, pm *ProcessMonitor) error

Start runs the NGINX instance.

Types

type Config

type Config struct {
	BinPath    string
	RunPath    string
	ConfigPath string
}

Config represents the runtime configuration for a wrapped NGINX instance.

type ProcessMonitor

type ProcessMonitor struct {
	sync.WaitGroup
	Stop chan struct{}
	// contains filtered or unexported fields
}

ProcessMonitor represents a WaitGroup extended for monitoring the lifecycle of a NGINX process.

func NewProcessMonitor

func NewProcessMonitor() *ProcessMonitor

NewProcessMonitor creates a new fully configured instance.

func (*ProcessMonitor) Increment

func (pm *ProcessMonitor) Increment()

Increment adds 1 to the WaitGroup counter.

func (*ProcessMonitor) Reload

func (pm *ProcessMonitor) Reload(cause string)

Reload starts the process of reconfiguring the wrapped nginx process.

func (*ProcessMonitor) Shutdown

func (pm *ProcessMonitor) Shutdown(cause string)

Shutdown gracefully stops the wrapped nginx process.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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