server

package
v0.0.0-...-e5aaa3f Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2020 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Equalizer

type Equalizer struct {
	sync.Map
}

func NewEqualizer

func NewEqualizer() *Equalizer

func (*Equalizer) Handle

func (e *Equalizer) Handle(rw http.ResponseWriter, r *http.Request)

func (*Equalizer) Update

func (e *Equalizer) Update(host string, services []string)

type Limit

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

func NewLimit

func NewLimit() *Limit

func (*Limit) Handle

func (l *Limit) Handle(r *http.Request) bool

func (*Limit) Run

func (l *Limit) Run()

type Server

type Server struct {
	Equalizer *Equalizer
	Limit     *Limit

	*http.ServeMux
}

func NewServer

func NewServer() *Server

func (*Server) EqualizerHandleFunc

func (s *Server) EqualizerHandleFunc(rw http.ResponseWriter, r *http.Request)

type Service

type Service struct {
	Host    string
	Servers []string
}

Jump to

Keyboard shortcuts

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