nginx

package
v0.0.0-...-ef0b163 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HealthPath = "/healthz"

HealthPath defines the path used to define the health check location in NGINX

View Source
var PID = "/tmp/nginx.pid"

PID defines the location of the pid file used by NGINX

View Source
var StatusPath = "/nginx_status"

StatusPath defines the path used to expose the NGINX status page http://nginx.org/en/docs/http/ngx_http_stub_status_module.html

View Source
var StatusSocket = "/tmp/nginx-status-server.sock"

StatusSocket defines the location of the unix socket used by NGINX for the status server

View Source
var StreamSocket = "/tmp/ingress-stream.sock"

StreamSocket defines the location of the unix socket used by NGINX for the NGINX stream configuration socket

Functions

func GetServerBlock

func GetServerBlock(conf string, host string) (string, error)

GetServerBlock takes an nginx.conf file and a host and tries to find the server block for that host

func NewGetStatusRequest

func NewGetStatusRequest(path string) (int, []byte, error)

NewGetStatusRequest creates a new GET request to the internal NGINX status server

func NewPostStatusRequest

func NewPostStatusRequest(path, contentType string, data interface{}) (int, []byte, error)

NewPostStatusRequest creates a new POST request to the internal NGINX status server

func ReadFileToString

func ReadFileToString(path string) (string, error)

ReadFileToString reads any file into a string

func ReadNginxConf

func ReadNginxConf() (string, error)

ReadNginxConf reads the nginx configuration file into a string

Types

This section is empty.

Jump to

Keyboard shortcuts

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