rainbond: github.com/goodrain/rainbond/gateway/controller/openresty Index | Files | Directories

package openresty

import "github.com/goodrain/rainbond/gateway/controller/openresty"

Index

Package Files

checker.go rbd_endpoints.go service.go

type OrService Uses

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

OrService handles the business logic of OpenrestyService

func CreateOpenrestyService Uses

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

CreateOpenrestyService create openresty service

func (*OrService) Check Uses

func (o *OrService) Check() error

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

func (*OrService) PersistConfig Uses

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

PersistConfig persists ocfg

func (*OrService) Start Uses

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

Start starts nginx

func (*OrService) Stop Uses

func (o *OrService) Stop() error

Stop gracefully stops the openresty master process.

func (*OrService) UpdatePools Uses

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

UpdatePools updates http upstreams dynamically.

func (*OrService) WaitPluginReady Uses

func (o *OrService) WaitPluginReady()

WaitPluginReady waits for nginx to be ready.

type Server Uses

type Server struct {
    Host   string
    Port   int32
    Weight int
}

Server belongs to Upstream

type Upstream Uses

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

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

Directories

PathSynopsis
model
nginxcmd
template

Package openresty imports 23 packages (graph) and is imported by 1 packages. Updated 2019-11-15. Refresh now. Tools for package owners.