nginx

package
v1.0.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HealthCheckTimeout = 10 * time.Second

HealthCheckTimeout defines the time limit in seconds for a probe to health-check-path to succeed

View Source
var HealthPath = "/healthz"

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

View Source
var MaxmindEditionFiles []string

MaxmindEditionFiles maxmind databases on disk

View Source
var MaxmindEditionIDs = ""

MaxmindEditionIDs maxmind editions (GeoLite2-City, GeoLite2-Country, GeoIP2-ISP, etc)

View Source
var MaxmindLicenseKey = ""

MaxmindLicenseKey maxmind license key to download databases

View Source
var MaxmindMirror = ""

MaxmindMirror maxmind database mirror url (http://geoip.local)

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

PID defines the location of the pid file used by NGINX

View Source
var ProfilerPort = 10245

ProfilerPort port used by the ingress controller to expose the Go Profiler when it is enabled.

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 StatusPort = 10246

StatusPort port used by NGINX for the status server

View Source
var StreamPort = 10247

StreamPort defines the port used by NGINX for the NGINX stream configuration socket

View Source
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

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 IsRunning

func IsRunning() bool

IsRunning returns true if a process with the name 'nginx' is found

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 ReadNginxConf

func ReadNginxConf() (string, error)

ReadNginxConf reads the nginx configuration file into a string

func ValidateGeoLite2DBEditions

func ValidateGeoLite2DBEditions() error

ValidateGeoLite2DBEditions check provided Maxmind database editions names

func Version

func Version() string

Version return details about NGINX

Types

This section is empty.

Jump to

Keyboard shortcuts

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