Documentation ¶
Index ¶
- Variables
- func DownloadGeoLite2DB() error
- func GeoLite2DBExists() bool
- func GetServerBlock(conf string, host string) (string, error)
- func IsRunning() bool
- func NewGetStatusRequest(path string) (int, []byte, error)
- func NewPostStatusRequest(path, contentType string, data interface{}) (int, []byte, error)
- func ReadNginxConf() (string, error)
- func ValidateGeoLite2DBEditions() error
- func Version() string
Constants ¶
This section is empty.
Variables ¶
var HealthCheckTimeout = 10 * time.Second
HealthCheckTimeout defines the time limit in seconds for a probe to health-check-path to succeed
var HealthPath = "/healthz"
HealthPath defines the path used to define the health check location in NGINX
var MaxmindEditionFiles []string
MaxmindEditionFiles maxmind databases on disk
var MaxmindEditionIDs = ""
MaxmindEditionIDs maxmind editions (GeoLite2-City, GeoLite2-Country, GeoIP2-ISP, etc)
var MaxmindLicenseKey = ""
MaxmindLicenseKey maxmind license key to download databases
var PID = "/tmp/nginx.pid"
PID defines the location of the pid file used by NGINX
var ProfilerPort = 10245
ProfilerPort port used by the ingress controller to expose the Go Profiler when it is enabled.
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 StatusPort = 10246
StatusPort port used by NGINX for the status server
var StreamPort = 10247
StreamPort defines the port used by NGINX for the NGINX stream configuration socket
var TemplatePath = "/etc/nginx/template/nginx.tmpl"
TemplatePath path of the NGINX template
Functions ¶
func DownloadGeoLite2DB ¶
func DownloadGeoLite2DB() error
DownloadGeoLite2DB downloads the required databases by the GeoIP2 NGINX module using a license key from MaxMind.
func GeoLite2DBExists ¶
func GeoLite2DBExists() bool
GeoLite2DBExists checks if the required databases for the GeoIP2 NGINX module are present in the filesystem
func GetServerBlock ¶
GetServerBlock takes an nginx.conf file and a host and tries to find the server block for that host
func IsRunning ¶
func IsRunning() bool
IsRunning returns true if a process with the name 'nginx' is found
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 ReadNginxConf ¶
ReadNginxConf reads the nginx configuration file into a string
func ValidateGeoLite2DBEditions ¶
func ValidateGeoLite2DBEditions() error
ValidateGeoLite2DBEditions check provided Maxmind database editions names
Types ¶
This section is empty.