debug

package
v2.22.0 Latest Latest
Warning

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

Go to latest
Published: May 29, 2025 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Module for fx.

Functions

func IsEnabled

func IsEnabled(cfg *Config) bool

IsEnabled for HTTP.

func RegisterFgprof

func RegisterFgprof(mux *ServeMux)

RegisterFgprof for debug.

func RegisterPprof

func RegisterPprof(mux *ServeMux)

RegisterPprof for debug.

func RegisterPsutil

func RegisterPsutil(mux *ServeMux, cont *content.Content)

RegisterPprof for debug.

func RegisterStatsviz

func RegisterStatsviz(mux *ServeMux) error

RegisterStatsviz for debug.

Types

type CPU

type CPU struct {
	Info  []cpu.InfoStat  `yaml:"info,omitempty" json:"info,omitempty" toml:"info,omitempty"`
	Times []cpu.TimesStat `yaml:"times,omitempty" json:"times,omitempty" toml:"times,omitempty"`
}

CPU for debug.

type Config

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

Config for HTTP.

type Mem

type Mem struct {
	Swap    *mem.SwapMemoryStat    `yaml:"swap,omitempty" json:"swap,omitempty" toml:"swap,omitempty"`
	Virtual *mem.VirtualMemoryStat `yaml:"virtual,omitempty" json:"virtual,omitempty" toml:"virtual,omitempty"`
	Devices []*mem.SwapDevice      `yaml:"devices,omitempty" json:"devices,omitempty" toml:"devices,omitempty"`
}

Mem for debug.

type Response

type Response struct {
	CPU *CPU `yaml:"cpu,omitempty" json:"cpu,omitempty" toml:"cpu,omitempty"`
	Mem *Mem `yaml:"mem,omitempty" json:"mem,omitempty" toml:"mem,omitempty"`
}

Response for debug.

type ServeMux

type ServeMux struct {
	*http.ServeMux
}

ServeMux is a composed of a http.ServeMux.

func NewServeMux

func NewServeMux() *ServeMux

NewServeMux creates a new ServeMux.

type Server

type Server struct {
	*server.Service
}

Server for debug.

func NewServer

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

NewServer for debug.

func (*Server) GetServer

func (s *Server) GetServer() *server.Service

GetServer returns the server, if defined.

type ServerParams

type ServerParams struct {
	fx.In

	Shutdowner fx.Shutdowner
	Mux        *ServeMux
	Config     *Config
	Logger     *logger.Logger
	FS         *os.FS
}

ServerParams for debug.

Jump to

Keyboard shortcuts

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