domain

package
v0.0.0-...-0358740 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Strategy string    `yaml:"strategy"`
	Services []Service `yaml:"services"`
}

type Replica

type Replica struct {
	Metadata map[string]string `yaml:"metadata"`
	Url      string            `yaml:"url"`
}

type Server

type Server struct {
	Url      *url.URL
	Proxy    *httputil.ReverseProxy
	Metadata map[string]string
	// contains filtered or unexported fields
}

func (*Server) Forward

func (s *Server) Forward(res http.ResponseWriter, req *http.Request)

func (*Server) GetMetaOrDefault

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

func (*Server) GetMetaOrDefaultInt

func (s *Server) GetMetaOrDefaultInt(key string, def int) int

func (*Server) IsAlive

func (s *Server) IsAlive() bool

func (*Server) SetLiveness

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

type Service

type Service struct {
	Name     string    `yaml:"name"`
	Matcher  string    `yaml:"matcher"`
	Strategy string    `yaml:"strategy"`
	Replicas []Replica `yaml:"replicas"`
}

TODO: Improve Matcher with something like Regex or Subsdomain

Jump to

Keyboard shortcuts

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