Documentation ¶
Index ¶
- Constants
- Variables
- type Config
- func (config Config) Address() string
- func (config *Config) Build() *Server
- func (config *Config) WithDeployment(deployment string) *Config
- func (config *Config) WithHost(host string) *Config
- func (config *Config) WithMode(mode string) *Config
- func (config *Config) WithPort(port int) *Config
- func (config *Config) WithServiceAddress(serviceAddress string) *Config
- type Server
Constants ¶
View Source
const ModName = "server.monitor"
ModName ..
Variables ¶
View Source
var ( // DefaultServeMux ... DefaultServeMux = http.NewServeMux() )
DefaultServeMux ...
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Host string Port int Deployment string Mode string ServiceAddress string // ServiceAddress service address in registry info, default to 'Host:Port' }
Config HTTP config
func (*Config) WithDeployment ¶
WithDeployment ...
func (*Config) WithServiceAddress ¶
WithServiceAddress ...
type Server ¶
Server ...
func (*Server) GracefulStop ¶
GracefulStop ..
func (*Server) HandleFunc ¶
func (s *Server) HandleFunc(pattern string, handler http.HandlerFunc)
HandleFunc ...
Click to show internal directories.
Click to hide internal directories.