package
1.3.0
Repository: https://github.com/warpstreamlabs/bento.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# Functions

BloblangFunctionsMarkdown returns a markdown document for all Bloblang functions.
BloblangMethodsMarkdown returns a markdown document for all Bloblang methods.
ComponentFieldsFromConf walks the children of a YAML node and returns a list of fields extracted from it.
FieldAnything returns a field spec for any typed field.
FieldBloblang returns a field spec for a string typed field containing a Bloblang mapping.
FieldBool returns a field spec for a common bool typed field.
FieldBuffer returns a field spec for a buffer typed field.
FieldCache returns a field spec for a cache typed field.
FieldComponent returns a field spec for a component.
FieldFloat returns a field spec for a common float typed field.
FieldFromYAML infers a field spec from a YAML node.
FieldInput returns a field spec for an input typed field.
FieldInt returns a field spec for a common int typed field.
FieldInterpolatedString returns a field spec for a string typed field supporting dynamic interpolated functions.
FieldMetrics returns a field spec for a metrics typed field.
FieldObject returns a field spec for an object typed field.
FieldOutput returns a field spec for an output typed field.
FieldProcessor returns a field spec for a processor typed field.
FieldRateLimit returns a field spec for a rate limit typed field.
FieldScanner returns a field spec for a scanner typed field.
FieldsFromConf attempts to infer field documents from a config struct.
FieldsFromYAML walks the children of a YAML node and returns a list of fields extracted from it.
FieldsTemplate returns a Go template for rendering markdown field documentation.
FieldString returns a field spec for a common string typed field.
FieldTracer returns a field spec for a tracer typed field.
FieldURL returns a field spec for a string typed field containing a URL, both linting rules and scrubbers are added.
GetInferenceCandidateFromMap checks a map config structure for a component and returns either the inferred type name or an error if one cannot be inferred.
GetInferenceCandidateFromYAML checks a yaml node config structure for a component and returns either the inferred type name or an error if one cannot be inferred.
GetPluginConfigYAML extracts a plugin configuration node from a component config.
GetYAMLPath attempts to obtain a specific value within a YAML tree by following a sequence of path identifiers.
LintBloblangField is function for linting a config field expected to be an interpolation string.
LintBloblangMapping is function for linting a config field expected to be a bloblang mapping.
LintYAML takes a yaml.Node and a config spec and returns a list of linting errors found in the config.
MarshalYAML marshals a structure into YAML with consistent formatting across all Bento components.
MetricsMappingFieldSpec is a field spec that describes a Bloblang mapping for renaming metrics.
NewLintConfig creates a default linting config.
NewLintContext creates a new linting context.
NewLintError returns an error lint.
NewLintWarning returns a warning lint.
NewMappedDocsProvider creates a new (empty) provider of component docs.
NewSanitiseConfig creates a new sanitise config.
ReservedFieldsByType returns a map of fields for a specific type.
SanitiseYAML takes a yaml.Node and a config spec and sorts the fields of the node according to the spec.
ShouldDropDeprecated returns a field filter that removes all deprecated fields when the boolean argument is true.
Types returns a slice containing all component types.
UnmarshalYAML attempts to parse a byte slice as a YAML document and returns the root of the underlying document contents.
ValidateLabel attempts to validate the contents of a component label.

# Constants

LintBadBloblang means the field contains invalid Bloblang.
LintBadLabel means the label contains invalid characters.
LintComponentMissing means a component value was expected but the type is missing.
LintComponentNotFound means the specified component value is not recognised.
LintCustom means a custom linting rule failed.
LintDeprecated means a field is deprecated and should not be used.
LintDuplicateLabel means the label collides with another label.
Lint levels.
LintExpectedArray means an array value was expected but something else was provided.
LintExpectedObject means an object value was expected but something else was provided.
LintExpectedScalar means a scalar value was expected but something else was provided.
LintFailedRead means a configuration could not be read.
LintInvalidOption means the field value was not one of the explicit list of options.
LintMissing means a field was required but missing.
LintMissingEnvVar means a configuration contained an environment variable interpolation without a default and the variable was undefined.
LintMissingLabel means the label is missing when required.
LintShouldOmit means the field should be omitted.
LintUnknown means the field is unknown.
Lint levels.

# Variables

ErrBadLabel is returned when creating a component with a bad label.
ValueType variants.
ValueType variants.
ValueType variants.
ValueType variants.
Core component types, only components that can be a child of another component config are listed here.
ValueType variants.
ValueType variants.
ValueType variants.
ValueType variants.
ValueType variants.
ValueType variants.
ValueType variants.
ValueType variants.
ValueType variants.
ValueType variants.
ValueType variants.
ValueType variants.
ValueType variants.
ValueType variants.
Component statuses.
Component statuses.
Component statuses.
Component statuses.
Component types.
Component types.
Component types.
Component types.
Component types.
Component types.
Component types.
Component types.
Component types.

# Structs

AnnotatedExample is an isolated example for a component.
ComponentSpec describes a Bento component.
FieldSpec describes a component config field.
FieldSpecCtx provides a field spec and rendered extras for documentation templates to use.
Lint describes a single linting issue found with a Bento config.
LintConfig describes which rules apply when linting bento configs, and also determines which component and bloblang environments are used.
LintContext is provided to linting functions, and provides context about the wider configuration.
MappedDocsProvider stores component documentation in maps, protected by a mutex, allowing safe concurrent use.
ParsedConfig represents a plugin configuration that has been validated and parsed from a ConfigSpec, and allows plugin constructors to access configuration fields.
SanitiseConfig contains fields describing the desired behaviour of the config sanitiser such as removing certain fields.
ToValueConfig describes custom options for how documentation fields should be used to convert a parsed node to a value type.
WalkedYAMLComponent is a struct containing information about a component yielded via the WalkYAML method.

# Interfaces

Provider stores the component spec definitions of various component implementations.

# Type aliases

ComponentWalkYAMLFunc is called for each component type within a YAML config, where the node representing that component is provided along with the type and implementation name.
FieldFilter defines a filter closure that returns a boolean for a component field indicating whether the field should be kept within a generated config.
FieldKind represents a field kind.
FieldSpecs is a slice of field specs for a component.
FieldType represents a field type.
LintFunc is a common linting function for field values.
LintLevel describes the severity level of a linting error.
LintType is a discrete linting type.
Status of a component.
Type of a component.