monitor

package
v1.8.7 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2021 License: Apache-2.0 Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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) Shutdown added in v1.7.19

func (s *Server) Shutdown() error

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