nginx

package
v0.0.0-...-7d7e621 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2019 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Binary = "/usr/local/openresty/nginx/sbin/nginx"

Binary location of NGINX binary.

View Source
var StatusSocket = "/tmp/nginx-config-socket.sock"

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

View Source
var Template = "/etc/nginx/template/nginx.tmpl"

Template NGINX template useed to render the configuration file

Functions

func Compare

func Compare(listA, listB interface{}, eq equalFunction) bool

Compare checks if the parameters are iterable and contains the same elements

Types

type Configuration

type Configuration struct {
	// Servers server sections
	Servers []Server `json:"servers"`
}

Configuration defines an NGINX configuration

func (*Configuration) Equal

func (c *Configuration) Equal(to *Configuration) bool

Equal tests for equality between two Server types

type Endpoint

type Endpoint struct {
	Address string `json:"address,omitempty"`
	Port    string `json:"port,omitempty"`
}

Endpoint defines the IP address and port of a pod from the deployment

func (*Endpoint) Equal

func (e *Endpoint) Equal(to *Endpoint) bool

Equal compares the endpoint with another one

type NGINX

type NGINX interface {
	// Start creates a new NGINX process
	Start(stopCh <-chan struct{}) error

	// Update changes the running configuration in NGINX
	Update(*Configuration) error
}

NGINX defines

func NewInstance

func NewInstance(path string) (NGINX, error)

NewInstance returns an NGINX instance

type Server

type Server struct {
	Name      string     `json:"name,omitempty"`
	Port      string     `json:"port,omitempty"`
	Endpoints []Endpoint `json:"endpoints"`
}

Server defines an NGINX server section

func (*Server) Equal

func (e *Server) Equal(to *Server) bool

Equal compares the server with another one

Jump to

Keyboard shortcuts

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