Back to

Package openresty

Latest Go to latest

The latest major version is .

Published: Apr 16, 2020 | License: LGPL-3.0 | Module:


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) error

Start starts nginx

func (*OrService) Stop

func (o *OrService) Stop() error

Stop gracefully stops the openresty 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

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier