common

package
v0.0.0-...-9c84b05 Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	http.Server
	// contains filtered or unexported fields
}

func NewServer

func NewServer(replica *config.Replica, serviceName string) *Server

TODO (Mo-Fatah): Refactor this to use the Service struct as a parameter

func (*Server) GetMetaOrDefault

func (s *Server) GetMetaOrDefault(key string, defaultValue string) string

func (*Server) GetMetaOrDefaultInt

func (s *Server) GetMetaOrDefaultInt(key string, defaultValue int) uint32

func (*Server) GetServiceName

func (s *Server) GetServiceName() string

TODO (Mo-Fatah): Implement this

func (*Server) GetUrl

func (s *Server) GetUrl() *url.URL

func (*Server) GetWeight

func (s *Server) GetWeight() uint32

func (*Server) IsAlive

func (s *Server) IsAlive() bool

func (*Server) Proxy

func (s *Server) Proxy(w http.ResponseWriter, r *http.Request)

func (*Server) SetLiveness

func (s *Server) SetLiveness(alive bool) bool

func (*Server) SetWeight

func (s *Server) SetWeight(weight uint32)

Jump to

Keyboard shortcuts

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