schema

package module
v0.0.0-...-1e93a8c Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: Apache-2.0 Imports: 1 Imported by: 1 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package schema provides a component validating the Agent configurations against their schemas

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Component

type Component interface {
	// ValidateConfig validates the settings of config against its schema (see model.Reader.GetSchemaID), records
	// the violations for GetViolations and returns them.
	//
	// It's meant to be called by the configuration while it loads: once the configuration file and the environment
	// variables are loaded, but before secrets are resolved and before the Agent changes any setting at runtime.
	// Secrets are therefore still ENC[] placeholders, which are not validated.
	ValidateConfig(config model.Reader) ([]*model.Violation, error)

	// GetViolations returns the violations recorded by the last ValidateConfig for the schemaID.
	GetViolations(schemaID model.SchemaID) []*model.Violation

	// ValidateYAML validates raw YAML contents against the schema identified by schemaID.
	ValidateYAML(data []byte, schemaID model.SchemaID) ([]*model.Violation, error)
}

Component validates configurations against the schemas embedded in the Agent.

Validating a configuration links the JSON schema library and the embedded schemas into the binary. Binaries that don't validate their configuration use the noop implementation to stay small.

Jump to

Keyboard shortcuts

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