proplet

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AggregatedMetrics

type AggregatedMetrics struct {
	AvgCPUUsage    float64 `json:"avg_cpu_usage"`
	MaxCPUUsage    float64 `json:"max_cpu_usage"`
	AvgMemoryUsage uint64  `json:"avg_memory_usage"`
	MaxMemoryUsage uint64  `json:"max_memory_usage"`
	TotalDiskRead  uint64  `json:"total_disk_read"`
	TotalDiskWrite uint64  `json:"total_disk_write"`
	SampleCount    int     `json:"sample_count"`
}

type CPUMetrics

type CPUMetrics struct {
	UserSeconds   float64 `json:"user_seconds"`
	SystemSeconds float64 `json:"system_seconds"`
	Percent       float64 `json:"percent"` // 100% = one full CPU core
}

type ChunkPayload

type ChunkPayload struct {
	AppName     string `json:"app_name"`
	ChunkIdx    int    `json:"chunk_idx"`
	TotalChunks int    `json:"total_chunks"`
	Data        []byte `json:"data"`
}

type MemoryMetrics

type MemoryMetrics struct {
	RSSBytes uint64 `json:"rss_bytes"`

	HeapAllocBytes uint64 `json:"heap_alloc_bytes"`
	HeapSysBytes   uint64 `json:"heap_sys_bytes"`
	HeapInuseBytes uint64 `json:"heap_inuse_bytes"`

	ContainerUsageBytes *uint64 `json:"container_usage_bytes,omitempty"`
	ContainerLimitBytes *uint64 `json:"container_limit_bytes,omitempty"`
}

type MonitoringProfile

type MonitoringProfile struct {
	Enabled                bool          `json:"enabled"`
	Interval               time.Duration `json:"interval"`
	CollectCPU             bool          `json:"collect_cpu"`
	CollectMemory          bool          `json:"collect_memory"`
	CollectDiskIO          bool          `json:"collect_disk_io"`
	CollectThreads         bool          `json:"collect_threads"`
	CollectFileDescriptors bool          `json:"collect_file_descriptors"`
	ExportToMQTT           bool          `json:"export_to_mqtt"`
	RetainHistory          bool          `json:"retain_history"`
	HistorySize            int           `json:"history_size"`
}

type ProcessMetrics

type ProcessMetrics struct {
	CPUPercent          float64 `json:"cpu_percent"`
	MemoryBytes         uint64  `json:"memory_bytes"`
	MemoryPercent       float32 `json:"memory_percent"`
	DiskReadBytes       uint64  `json:"disk_read_bytes"`
	DiskWriteBytes      uint64  `json:"disk_write_bytes"`
	UptimeSeconds       int64   `json:"uptime_seconds"`
	ThreadCount         int32   `json:"thread_count"`
	FileDescriptorCount int32   `json:"file_descriptor_count,omitempty"`
}

type Proplet

type Proplet struct {
	ID           string          `json:"id"`
	Name         string          `json:"name"`
	TaskCount    uint64          `json:"task_count"`
	Alive        bool            `json:"alive"`
	AliveHistory []time.Time     `json:"alive_at"`
	Metadata     PropletMetadata `json:"metadata"`
}

func (*Proplet) SetAlive

func (p *Proplet) SetAlive()

type PropletMetadata

type PropletMetadata struct {
	Description      string   `json:"description,omitempty"`
	Tags             []string `json:"tags,omitempty"`
	Location         string   `json:"location,omitempty"`
	IP               string   `json:"ip,omitempty"`
	Environment      string   `json:"environment,omitempty"`
	OS               string   `json:"os,omitempty"`
	Hostname         string   `json:"hostname,omitempty"`
	CPUArch          string   `json:"cpu_arch,omitempty"`
	TotalMemoryBytes uint64   `json:"total_memory_bytes,omitempty"`
	PropletVersion   string   `json:"proplet_version,omitempty"`
	WasmRuntime      string   `json:"wasm_runtime,omitempty"`
}

type PropletPage

type PropletPage struct {
	Offset   uint64    `json:"offset"`
	Limit    uint64    `json:"limit"`
	Total    uint64    `json:"total"`
	Proplets []Proplet `json:"proplets"`
}

Jump to

Keyboard shortcuts

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