util

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package util provides utility functions for Node Doctor.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultConfig

func DefaultConfig() (*types.NodeDoctorConfig, error)

DefaultConfig returns a default configuration suitable for basic monitoring.

func LoadConfig

func LoadConfig(path string) (*types.NodeDoctorConfig, error)

LoadConfig loads configuration from a file (YAML or JSON). The file format is determined by extension (.yaml, .yml, .json). Environment variables are substituted, defaults are applied, and validation is performed.

func LoadConfigOrDefault

func LoadConfigOrDefault(path string) (*types.NodeDoctorConfig, error)

LoadConfigOrDefault loads configuration from a file, or returns default if file doesn't exist.

func SaveConfig

func SaveConfig(config *types.NodeDoctorConfig, path string) error

SaveConfig saves configuration to a file (YAML or JSON based on extension).

func ValidateConfigFile

func ValidateConfigFile(path string) error

ValidateConfigFile validates a configuration file without loading it into memory.

Types

This section is empty.

Jump to

Keyboard shortcuts

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