Documentation
¶
Index ¶
- func RegisterHandlers(server *server.Server, grp *huma.Group)
- type AllInput
- type AllResponse
- type CpuInput
- type CpuResponse
- type DiskMountsResponse
- type DiskRateInput
- type DiskRateResponse
- type DiskResponse
- type GPUResponse
- type GPUTempInput
- type GPUTempResponse
- type HandlerGroup
- func (self *HandlerGroup) All(ctx context.Context, input *AllInput) (*AllResponse, error)
- func (self *HandlerGroup) Cpu(ctx context.Context, input *CpuInput) (*CpuResponse, error)
- func (self *HandlerGroup) Disk(ctx context.Context, _ *server.EmptyInput) (*DiskResponse, error)
- func (self *HandlerGroup) DiskMounts(ctx context.Context, _ *server.EmptyInput) (*DiskMountsResponse, error)
- func (self *HandlerGroup) DiskRate(ctx context.Context, input *DiskRateInput) (*DiskRateResponse, error)
- func (self *HandlerGroup) GPU(ctx context.Context, input *struct{}) (*GPUResponse, error)
- func (self *HandlerGroup) GPUTemp(ctx context.Context, input *GPUTempInput) (*GPUTempResponse, error)
- func (self *HandlerGroup) Memory(ctx context.Context, _ *server.EmptyInput) (*MemoryResponse, error)
- func (self *HandlerGroup) Meta(ctx context.Context, input *MetaInput) (*MetaResponse, error)
- func (self *HandlerGroup) Modules(ctx context.Context, input *struct{}) (*ModulesResponse, error)
- func (self *HandlerGroup) NetRate(ctx context.Context, input *NetRateInput) (*NetRateResponse, error)
- func (self *HandlerGroup) Network(ctx context.Context, _ *server.EmptyInput) (*NetworkResponse, error)
- func (self *HandlerGroup) Processes(ctx context.Context, input *ProcessInput) (*ProcessResponse, error)
- func (self *HandlerGroup) System(ctx context.Context, _ *server.EmptyInput) (*SystemResponse, error)
- func (self *HandlerGroup) SystemHardware(ctx context.Context, input *struct{}) (*SystemHardwareResponse, error)
- type MemoryResponse
- type MetaInput
- type MetaResponse
- type ModulesResponse
- type NetRateInput
- type NetRateResponse
- type NetworkResponse
- type ProcessInput
- type ProcessResponse
- type SystemHardwareResponse
- type SystemResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AllInput ¶
type AllInput struct {
SortBy gops.ProcSortBy `query:"ps_sort_by" required:"true" default:"cpu"`
Limit int `query:"ps_limit"`
DisableProcCPU bool `query:"disable_proc_cpu" default:"false"`
MergeChildren bool `query:"merge_children" default:"true"`
}
type AllResponse ¶
type AllResponse struct {
Body struct {
Data *models.SystemMetrics `json:"data"`
}
}
type CpuResponse ¶
type DiskMountsResponse ¶
type DiskMountsResponse struct {
Body struct {
Data []*models.DiskMountInfo `json:"data"`
}
}
GET /disk/mounts
type DiskRateInput ¶ added in v0.0.5
type DiskRateInput struct {
Cursor string `query:"cursor" doc:"Base64 cursor for rate calculation"`
}
type DiskRateResponse ¶ added in v0.0.5
type DiskRateResponse struct {
Body *models.DiskRateResponse
}
type DiskResponse ¶
type GPUResponse ¶
type GPUTempInput ¶
type GPUTempInput struct {
PciId string `query:"pciId" required:"true" example:"10de:2684"`
}
type GPUTempResponse ¶
type GPUTempResponse struct {
Body *models.GPUTempInfo
}
type HandlerGroup ¶
type HandlerGroup struct {
// contains filtered or unexported fields
}
func (*HandlerGroup) All ¶
func (self *HandlerGroup) All(ctx context.Context, input *AllInput) (*AllResponse, error)
GET /all
func (*HandlerGroup) Cpu ¶
func (self *HandlerGroup) Cpu(ctx context.Context, input *CpuInput) (*CpuResponse, error)
GET /cpu
func (*HandlerGroup) Disk ¶
func (self *HandlerGroup) Disk(ctx context.Context, _ *server.EmptyInput) (*DiskResponse, error)
GET /disk
func (*HandlerGroup) DiskMounts ¶
func (self *HandlerGroup) DiskMounts(ctx context.Context, _ *server.EmptyInput) (*DiskMountsResponse, error)
func (*HandlerGroup) DiskRate ¶ added in v0.0.5
func (self *HandlerGroup) DiskRate(ctx context.Context, input *DiskRateInput) (*DiskRateResponse, error)
GET /disk-rate
func (*HandlerGroup) GPU ¶
func (self *HandlerGroup) GPU(ctx context.Context, input *struct{}) (*GPUResponse, error)
GET /gpu
func (*HandlerGroup) GPUTemp ¶
func (self *HandlerGroup) GPUTemp(ctx context.Context, input *GPUTempInput) (*GPUTempResponse, error)
GET /gpu/temp
func (*HandlerGroup) Memory ¶
func (self *HandlerGroup) Memory(ctx context.Context, _ *server.EmptyInput) (*MemoryResponse, error)
GET /memory
func (*HandlerGroup) Meta ¶
func (self *HandlerGroup) Meta(ctx context.Context, input *MetaInput) (*MetaResponse, error)
GET /meta
func (*HandlerGroup) Modules ¶
func (self *HandlerGroup) Modules(ctx context.Context, input *struct{}) (*ModulesResponse, error)
GET /modules
func (*HandlerGroup) NetRate ¶ added in v0.0.5
func (self *HandlerGroup) NetRate(ctx context.Context, input *NetRateInput) (*NetRateResponse, error)
GET /net-rate
func (*HandlerGroup) Network ¶
func (self *HandlerGroup) Network(ctx context.Context, _ *server.EmptyInput) (*NetworkResponse, error)
GET /network
func (*HandlerGroup) Processes ¶
func (self *HandlerGroup) Processes(ctx context.Context, input *ProcessInput) (*ProcessResponse, error)
GET /processes
func (*HandlerGroup) System ¶
func (self *HandlerGroup) System(ctx context.Context, _ *server.EmptyInput) (*SystemResponse, error)
GET /system
func (*HandlerGroup) SystemHardware ¶
func (self *HandlerGroup) SystemHardware(ctx context.Context, input *struct{}) (*SystemHardwareResponse, error)
GET /hardware
type MemoryResponse ¶
type MemoryResponse struct {
Body struct {
Data *models.MemoryInfo `json:"data"`
}
}
type MetaInput ¶
type MetaInput struct {
Modules []string `query:"modules" required:"true" example:"cpu,memory,network"`
SortBy gops.ProcSortBy `query:"sort_by" default:"cpu"`
Limit int `query:"limit" default:"0"`
DisableProcCPU bool `query:"disable_proc_cpu" default:"false"`
MergeChildren bool `query:"merge_children" default:"true"`
// Module-specific parameters
GPUPciIds []string `query:"gpu_pci_ids" example:"10de:2684,1002:164e" doc:"PCI IDs for GPU temperatures (when gpu module is requested)"`
CPUCursor string `query:"cpu_cursor" doc:"CPU cursor from previous request"`
ProcCursor string `query:"proc_cursor" doc:"Process cursor from previous request"`
NetRateCursor string `query:"net_rate_cursor" doc:"Network rate cursor from previous request"`
DiskRateCursor string `query:"disk_rate_cursor" doc:"Disk rate cursor from previous request"`
}
type MetaResponse ¶
type ModulesResponse ¶
type ModulesResponse struct {
Body *models.ModulesInfo
}
type NetRateInput ¶ added in v0.0.5
type NetRateInput struct {
Cursor string `query:"cursor" doc:"Base64 cursor for rate calculation"`
}
type NetRateResponse ¶ added in v0.0.5
type NetRateResponse struct {
Body *models.NetworkRateResponse
}
type NetworkResponse ¶
type NetworkResponse struct {
Body struct {
Data []*models.NetworkInfo `json:"data"`
}
}
type ProcessInput ¶
type ProcessResponse ¶
type ProcessResponse struct {
Body struct {
Data []*models.ProcessInfo `json:"data"`
Cursor string `json:"cursor,omitempty"`
}
}
type SystemHardwareResponse ¶
type SystemHardwareResponse struct {
Body *models.SystemHardware
}
type SystemResponse ¶
type SystemResponse struct {
Body struct {
Data *models.SystemInfo `json:"data"`
}
}
Click to show internal directories.
Click to hide internal directories.