agent

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2026 License: AGPL-3.0 Imports: 61 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run added in v0.22.0

func Run(version string)

Run starts the agent and blocks until a termination signal is received. This is the public entry point for external binaries (e.g. kubepaw) that embed catpaw's full agent lifecycle.

func RunInspect added in v0.10.0

func RunInspect(pluginName, target string) error

RunInspect executes a proactive health inspection from the CLI. For remote plugins (redis, mysql), it loads config to find connection credentials. For local-only plugins (cpu, mem, disk), target can be empty.

Types

type Agent

type Agent struct {
	Version string
	sync.RWMutex
	// contains filtered or unexported fields
}

func New

func New(version string) *Agent

func (*Agent) DelPlugin

func (a *Agent) DelPlugin(name string)

func (*Agent) GetPluginConfig

func (a *Agent) GetPluginConfig(name string) *PluginConfig

func (*Agent) HandleChangedPlugin

func (a *Agent) HandleChangedPlugin(names []string)

func (*Agent) HandleNewPlugin

func (a *Agent) HandleNewPlugin(names []string)

func (*Agent) LoadPlugin

func (a *Agent) LoadPlugin(name string, pc *PluginConfig)

func (*Agent) Reload

func (a *Agent) Reload()

func (*Agent) RunningPlugins

func (a *Agent) RunningPlugins() []string

func (*Agent) Start

func (a *Agent) Start()

func (*Agent) Stop

func (a *Agent) Stop()

type PluginConfig

type PluginConfig struct {
	Source      string // file || http
	Digest      string
	FileContent []byte
}

type PluginRunner

type PluginRunner struct {
	Instances []plugins.Instance
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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