inventory

package
v0.3.8 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2023 License: BSD-3-Clause Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckForAgents

func CheckForAgents(ctx context.Context) error

func FetchAgents

func FetchAgents(ctx context.Context) error

func SaveAgents

func SaveAgents(aa Agents) error

Types

type APIAgent

type APIAgent struct {
	Platforms []Platform `json:"platforms"`
}

type APIAgents

type APIAgents []APIAgent

type Agent

type Agent struct {
	ConfigFiles map[string]string `json:"config_files" yaml:"config_files"`
	Binary      string            `json:"binary"       yaml:"binary"`
	Start       string            `json:"start"        yaml:"start"`
	Stop        string            `json:"stop"         yaml:"stop"`
	Restart     string            `json:"restart"      yaml:"restart"`
	Reload      string            `json:"reload"       yaml:"reload"`
	Status      string            `json:"status"       yaml:"status"`
	Version     string            `json:"version"      yaml:"version"`
}

func GetAgent

func GetAgent(agentType string) (Agent, error)

type Agents

type Agents map[string]map[string]Agent

key1 is platform (GOOS) e.g. darwin, windows, linux, freebsd, etc. key2 is agent e.g. fluent-bit, telegraf, etc.

func LoadAgents

func LoadAgents() (Agents, error)

func ParseAPIAgents

func ParseAPIAgents(data []byte) (Agents, error)

type Commands

type Commands struct {
	Command string `json:"command" yaml:"command"`
	Name    string `json:"name"    yaml:"name"`
}

type ConfigFile

type ConfigFile struct {
	ConfigFileID string `json:"config_file_id" yaml:"config_file_id"`
	Path         string `json:"path"           yaml:"path"`
}

type InstalledAgent

type InstalledAgent struct {
	AgentTypeID string `json:"agent_type_id"`
	Version     string `json:"version"`
}

type InstalledAgents

type InstalledAgents []InstalledAgent

type Platform

type Platform struct {
	ID          string       `json:"platform_id"   yaml:"platform_id"`
	AgentTypeID string       `json:"agent_type_id" yaml:"agent_type_id"`
	Executable  string       `json:"executable"    yaml:"executable"`
	Commands    []Commands   `json:"commands"      yaml:"commands"`
	Start       string       `json:"start"         yaml:"start"`
	Stop        string       `json:"stop"          yaml:"stop"`
	Restart     string       `json:"restart"       yaml:"restart"`
	Reload      string       `json:"reload"        yaml:"reload"`
	Status      string       `json:"status"        yaml:"status"`
	Version     string       `json:"version"       yaml:"version"`
	ConfigFiles []ConfigFile `json:"config_files"  yaml:"config_files"`
}

type RegisterResponse

type RegisterResponse []RegisteredAgents

type RegisteredAgents

type RegisteredAgents struct {
	AgentID string `json:"agent_id"`
}

Jump to

Keyboard shortcuts

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