openresty

package
v5.1.6-release+incompa... Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2019 License: LGPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OrService

type OrService struct {
	IsShuttingDown *bool
	// contains filtered or unexported fields
}

OrService handles the business logic of OpenrestyService

func CreateOpenrestyService

func CreateOpenrestyService(config *option.Config, isShuttingDown *bool) *OrService

CreateOpenrestyService create openresty service

func (*OrService) Check

func (o *OrService) Check() error

Check returns if the nginx healthz endpoint is returning ok (status code 200)

func (*OrService) PersistConfig

func (o *OrService) PersistConfig(conf *v1.Config) error

PersistConfig persists ocfg

func (*OrService) Start

func (o *OrService) Start(errCh chan error)

Start starts nginx

func (*OrService) Stop

func (o *OrService) Stop() error

Stop gracefully stops the NGINX master process.

func (*OrService) UpdatePools

func (o *OrService) UpdatePools(hpools []*v1.Pool, tpools []*v1.Pool) error

UpdatePools updates http upstreams dynamically.

func (*OrService) WaitPluginReady

func (o *OrService) WaitPluginReady()

WaitPluginReady waits for nginx to be ready.

type Server

type Server struct {
	Host   string
	Port   int32
	Weight int
}

Server belongs to Upstream

type Upstream

type Upstream struct {
	Name    string
	Servers []*Server
}

Upstream defines a group of servers. Servers can listen on different ports

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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