puppetdb

package
v0.0.0-...-b901997 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node struct {
	Certname           string `json:"certname"`
	Deactivated        string `json:"deactivated"`
	LatestReportStatus string `json:"latest_report_status"`
	ReportEnvironment  string `json:"report_environment"`
	ReportTimestamp    string `json:"report_timestamp"`
	LatestReportHash   string `json:"latest_report_hash"`
}

Node is a structure returned by a PuppetDB

type Options

type Options struct {
	URL        string
	CertPath   string
	CACertPath string
	KeyPath    string
	SSLVerify  bool
}

Options contains the options used to connect to a PuppetDB

type PuppetDB

type PuppetDB struct {
	// contains filtered or unexported fields
}

PuppetDB stores informations used to connect to a PuppetDB

func NewClient

func NewClient(options *Options) (p *PuppetDB, err error)

NewClient creates a new PuppetDB client

func (*PuppetDB) Nodes

func (p *PuppetDB) Nodes() (nodes []Node, err error)

Nodes returns the list of nodes

func (*PuppetDB) ReportMetrics

func (p *PuppetDB) ReportMetrics(reportHash string) (reportMetrics []ReportMetric, err error)

ReportMetrics returns the list of reportMetrics

type ReportMetric

type ReportMetric struct {
	Name     string  `json:"name"`
	Value    float64 `json:"value"`
	Category string  `json:"category"`
}

ReportMetric is a structure returned by a PuppetDB

Jump to

Keyboard shortcuts

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