nginx

package
v0.0.0-...-e4afd51 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2016 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IngressNGINXConfig

type IngressNGINXConfig struct {
	Upstreams []Upstream
	Servers   []Server
}

IngressNGINXConfig describes an NGINX configuration

type Location

type Location struct {
	Path     string
	Upstream Upstream
}

Location describes an NGINX location

type NGINXController

type NGINXController struct {
	// contains filtered or unexported fields
}

NGINXController Updates NGINX configuration, starts and reloads NGINX

func NewNGINXController

func NewNGINXController(resolver string, nginxConfPath string, local bool) (*NGINXController, error)

NewNGINXController creates a NGINX controller

func (*NGINXController) AddOrUpdateCertAndKey

func (nginx *NGINXController) AddOrUpdateCertAndKey(name string, cert string, key string) string

AddOrUpdateCertAndKey creates a .pem file wth the cert and the key with the specified name

func (*NGINXController) AddOrUpdateIngress

func (nginx *NGINXController) AddOrUpdateIngress(name string, config IngressNGINXConfig)

AddOrUpdateIngress creates or updates a file with the specified configuration for the specified ingress

func (*NGINXController) DeleteIngress

func (nginx *NGINXController) DeleteIngress(name string)

DeleteIngress deletes the configuration file, which corresponds for the specified ingress from NGINX conf directory

func (*NGINXController) Reload

func (nginx *NGINXController) Reload()

Reload reloads NGINX

func (*NGINXController) Start

func (nginx *NGINXController) Start()

Start starts NGINX

type Server

type Server struct {
	Name              string
	Locations         []Location
	SSL               bool
	SSLCertificate    string
	SSLCertificateKey string
}

Server describes an NGINX server

type Upstream

type Upstream struct {
	Name            string
	UpstreamServers []UpstreamServer
}

Upstream describes an NGINX upstream

type UpstreamServer

type UpstreamServer struct {
	Address string
	Port    string
}

UpstreamServer describes a server in an NGINX upstream

Jump to

Keyboard shortcuts

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