monitor

package
v1.2.29 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DefaultServeMux ...
	DefaultServeMux = http.NewServeMux()
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Host    string
	Port    int
	Network string
	Enable  bool
	Name    string
}

Config ...

func (*Config) Address

func (config *Config) Address() string

Address ...

func (*Config) Build

func (config *Config) Build() *Server

Build create server instance, then initialize it with necessary interceptor

func (*Config) WithHost

func (config *Config) WithHost(host string) *Config

WithHost ...

func (*Config) WithName

func (config *Config) WithName(name string) *Config

WithName ...

func (*Config) WithPort

func (config *Config) WithPort(port int) *Config

WithPort ...

type Server

type Server struct {
	*http.Server

	*Config
	// contains filtered or unexported fields
}

Server ...

func (*Server) GracefulStop

func (s *Server) GracefulStop(ctx context.Context) error

GracefulStop ..

func (*Server) HandleFunc added in v1.1.24

func (s *Server) HandleFunc(pattern string, handler http.HandlerFunc)

HandleFunc ...

func (*Server) Info

func (s *Server) Info() *server.ServiceInfo

Info ..

func (*Server) Serve

func (s *Server) Serve() error

Serve ..

func (*Server) Stop

func (s *Server) Stop() error

Stop ..

Jump to

Keyboard shortcuts

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