nginx

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoKey = errors.New("list key no found")
)

Functions

This section is empty.

Types

type ErrInvalidKey

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

func (ErrInvalidKey) Error

func (e ErrInvalidKey) Error() string

type Nginx

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

Nginx register node for https://github.com/weibocom/nginx-upsync-module (with consul)

func New

func New(url, namespace, hostname string, logger *zap.Logger) *Nginx

func (*Nginx) Clear

func (sd *Nginx) Clear(preserveIP, preservePort string) (err error)

func (*Nginx) Delete

func (sd *Nginx) Delete(ip, port string, dc []string) (err error)

func (*Nginx) DeleteNode

func (sd *Nginx) DeleteNode(node string) (err error)

func (*Nginx) List

func (sd *Nginx) List() (nodes []string, err error)

func (*Nginx) ListMap

func (sd *Nginx) ListMap() (nodes map[string]string, err error)

func (*Nginx) Namespace

func (sd *Nginx) Namespace() string

func (*Nginx) Nodes

func (sd *Nginx) Nodes() (nodes []utils.KV, err error)

func (*Nginx) Update

func (sd *Nginx) Update(ip, port string, dc []string, weight int64) error

Jump to

Keyboard shortcuts

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