fb

package
v1.27.0 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package fb provides filebeat-compatible configuration validation for the mito tool. Validation rules mirror the constraints in the filebeat CEL input's config.go and config_auth.go without depending on go-ucfg or any elastic-agent-libs package.

Behaviour under -fb is not covered by semver compatibility guarantees. Validation rules may change between minor releases to track upstream filebeat changes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckState

func CheckState(state map[string]any) error

CheckState inspects state data (the -data JSON) and rejects it if it contains a "secret" key at the top level.

Types

type Config

type Config struct {
	Globals       map[string]interface{} `yaml:"globals"`
	Regexps       map[string]string      `yaml:"regexp"`
	XSDs          map[string]string      `yaml:"xsd"`
	Auth          *authConfig            `yaml:"auth"`
	HTTPHeaders   http.Header            `yaml:"http_headers"`
	MaxBodySize   int64                  `yaml:"max_body_size"`
	MaxExecutions *int                   `yaml:"max_executions"`

	Resource    *resourceConfig `yaml:"resource"`
	SecretState map[string]any  `yaml:"secret_state"`
}

Config is the filebeat-compatible configuration for mito. It contains all the fields from rc.Config plus resource, rate limit, and retry sections that filebeat's CEL input expects. Auth field names follow filebeat conventions (user/password, not username/password).

func (*Config) RC

func (c *Config) RC() rc.Config

RC returns the rc.Config subset needed by the mito runtime. Auth is converted from filebeat's field names to the lib types mito uses.

func (*Config) Validate

func (c *Config) Validate() error

Validate checks the configuration against filebeat CEL input constraints. Error messages match filebeat's where possible.

Jump to

Keyboard shortcuts

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