clusterdump

package
v3.0.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlkStats

type BlkStats struct {
	Read      uint64 `json:"r"`
	ReadByte  uint64 `json:"rb"`
	Write     uint64 `json:"w"`
	WriteByte uint64 `json:"wb"`
}

BlkStats holds block devices resource usage metrics.

type CPUStats

type CPUStats struct {
	Time uint64 `json:"time"`
}

CPUStats holds CPU resource usage metrics.

type Cluster

type Cluster struct {
	Config cluster.Config           `json:"config"`
	Status Status                   `json:"status"`
	Object map[string]object.Status `json:"object"`

	Node map[string]node.Node `json:"node"`
}

type Data

type Data struct {
	Cluster Cluster `json:"cluster"`

	Daemon daemonsubsystem.DaemonLocal `json:"daemon"`
}

Data describes the full Cluster state.

func (*Data) ArbitratorNames

func (s *Data) ArbitratorNames() []string

func (*Data) DeepCopy

func (s *Data) DeepCopy() *Data

func (*Data) GetNodeData

func (s *Data) GetNodeData(nodename string) *node.Node

GetNodeData extracts from the cluster dataset all information relative to node data.

func (*Data) GetNodeStatus

func (s *Data) GetNodeStatus(nodename string) *node.Status

GetNodeStatus extracts from the cluster dataset all information relative to node status.

func (*Data) GetObjectStatus

func (s *Data) GetObjectStatus(p naming.Path) object.Digest

GetObjectStatus extracts from the cluster dataset all information relative to an object.

func (*Data) ObjectPaths

func (s *Data) ObjectPaths() naming.Paths

func (*Data) WithNamespace

func (s *Data) WithNamespace(namespaces ...string) *Data

WithNamespace purges the dataset from objects not matching the namespace

func (*Data) WithSelector

func (s *Data) WithSelector(selector string) *Data

WithSelector purges the dataset from objects not matching the selector expression

type MemStats

type MemStats struct {
	Total uint64 `json:"total"`
}

MemStats holds CPU resource usage metrics.

type NetStats

type NetStats struct {
	Read      uint64 `json:"r"`
	ReadByte  uint64 `json:"rb"`
	Write     uint64 `json:"w"`
	WriteByte uint64 `json:"wb"`
}

NetStats holds network resource usage metrics.

type NodeStatsBundle

type NodeStatsBundle struct {
	Time       time.Time              `json:"time"`
	Collector  ThreadStats            `json:"collector"`
	Daemon     ThreadStats            `json:"daemon"`
	DNS        ThreadStats            `json:"dns"`
	Scheduler  ThreadStats            `json:"scheduler"`
	Listener   ThreadStats            `json:"listener"`
	Monitor    ThreadStats            `json:"monitor"`
	Heartbeats map[string]ThreadStats `json:"-"`
	Objects    map[string]ObjectStats `json:"objects"`
}

NodeStatsBundle embeds all daemon threads and each object system resource usage metrics.

func (*NodeStatsBundle) UnmarshalJSON

func (t *NodeStatsBundle) UnmarshalJSON(b []byte) error

UnmarshalJSON loads a byte array into a DaemonStatus struct

type ObjectStats

type ObjectStats struct {
	Blk       BlkStats  `json:"blk"`
	Net       NetStats  `json:"net"`
	Mem       MemStats  `json:"mem"`
	CPU       CPUStats  `json:"cpu"`
	Tasks     uint64    `json:"tasks"`
	CreatedAt time.Time `json:"created_at"`
}

ObjectStats holds an object (ie cgroup) system resource usage metrics

type Stats

type Stats map[string]NodeStatsBundle

Stats is a map of node statistics.

type Status

type Status struct {
	IsCompat bool `json:"is_compat"`
	IsFrozen bool `json:"is_frozen"`
}

type ThreadStats

type ThreadStats struct {
	CPU     CPUStats `json:"cpu"`
	Mem     MemStats `json:"mem"`
	Procs   uint64   `json:"procs"`
	Threads uint64   `json:"threads"`
}

ThreadStats holds a daemon thread system resource usage metrics

Jump to

Keyboard shortcuts

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