Documentation
¶
Index ¶
- Variables
- func GetServerBlock(conf string, host string) (string, error)
- func NewGetStatusRequest(path string) (int, []byte, error)
- func NewPostStatusRequest(path, contentType string, data interface{}) (int, []byte, error)
- func ReadFileToString(path string) (string, error)
- func ReadNginxConf() (string, error)
Constants ¶
This section is empty.
Variables ¶
var HealthPath = "/healthz"
HealthPath defines the path used to define the health check location in NGINX
var PID = "/tmp/nginx.pid"
PID defines the location of the pid file used by NGINX
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
var StatusSocket = "/tmp/nginx-status-server.sock"
StatusSocket defines the location of the unix socket used by NGINX for the status server
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 ¶
GetServerBlock takes an nginx.conf file and a host and tries to find the server block for that host
func NewGetStatusRequest ¶
NewGetStatusRequest creates a new GET request to the internal NGINX status server
func NewPostStatusRequest ¶
NewPostStatusRequest creates a new POST request to the internal NGINX status server
func ReadFileToString ¶
ReadFileToString reads any file into a string
func ReadNginxConf ¶
ReadNginxConf reads the nginx configuration file into a string
Types ¶
This section is empty.