debug

package
v1.144.1 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: MIT Imports: 16 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidPort = errors.New("invalid port")

ErrInvalidPort for HTTP.

Module for fx.

Functions

func IsEnabled added in v1.144.0

func IsEnabled(c *Config) bool

IsEnabled for HTTP.

func RegisterPprof added in v1.144.0

func RegisterPprof(server *Server)

RegisterPprof for debug.

func RegisterPsutil added in v1.144.0

func RegisterPsutil(server *Server, json *marshaller.JSON)

RegisterPprof for debug.

func RegisterStatsviz added in v1.144.0

func RegisterStatsviz(server *Server)

RegisterStatsviz for debug.

Types

type Config added in v1.112.0

type Config struct {
	*server.Config `yaml:",inline" json:",inline" toml:",inline"`
}

Config for HTTP.

type Server added in v1.144.0

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

Server for HTTP.

func NewServer added in v1.144.0

func NewServer(params ServerParams) (*Server, error)

NewServer for HTTP.

func (*Server) Start added in v1.144.0

func (s *Server) Start() error

Start the server.

func (*Server) Stop added in v1.144.0

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

Stop the server.

type ServerParams added in v1.144.0

type ServerParams struct {
	fx.In

	Shutdowner fx.Shutdowner
	Config     *Config
	Logger     *zap.Logger
}

ServerParams for HTTP.

Jump to

Keyboard shortcuts

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