framework

package
v0.0.0-...-fb5a1ab Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClusterTLSProfileSpec               = "tlsProfileSpec"
	MinTLSVersion                       = "minTLSVersion"
	Ciphers                             = "ciphers"
	URL                                 = "url"
	OptionServiceAccountTokenSecretName = "serviceAccountTokenSecretName"
	OptionForwarderName                 = "forwarderName"
	UseKubeCacheOption                  = "useKubeCache"
	MaxUnavailableOption                = "maxUnavailableRollout"

	//OptionLogsToMetricInputs identifies a set of inputs that should be used for exporting metrics
	OptionLogsToMetricInputs = "logsToMetricInputs"
)

Variables

View Source
var NoOptions = utils.NoOptions

NoOptions is used to pass empty options

Functions

func HasOption

func HasOption(name string, options []Option) (interface{}, bool)

func SetTLSProfileOptionsFrom

func SetTLSProfileOptionsFrom(op utils.Options, o obs.OutputSpec)

SetTLSProfileOptionsFrom updates options to set the TLS profile based upon the output spec

func TLSProfileInfo

func TLSProfileInfo(op utils.Options, outputSpec obs.OutputSpec, separator string) (string, string)

TLSProfileInfo returns the minTLSVersion, ciphers as a delimited list given the available TLSSecurityProfile

Types

type ComponentID

type ComponentID = string

ComponentID is used to define a component in vector configuration, a source, sink, etc

type ConfLiteral

type ConfLiteral struct {
	ComponentID
	TemplateName string
	Desc         string
	InLabel
	OutLabel
	Pattern     string
	TemplateStr string
}

func (ConfLiteral) Name

func (b ConfLiteral) Name() string

func (ConfLiteral) Template

func (b ConfLiteral) Template() string

type Element

type Element interface {
	Name() string
	Template() string
}

Element is a basic unit of configuration. It wraps a golang template along with the data type to hold the data template needs. A type implementing

func Comment

func Comment(c string) Element

func MergeElements

func MergeElements(els ...[]Element) []Element

MergeElements merges multiple arrays of Elements into a single array of Element

func MergeSections

func MergeSections(sections []Section) []Element

MergeSections merges multiple Sections into a single array of Element

type Generator

type Generator int

Generator converts an array of Elements to configuration. It is intentionally kept stateless.

func MakeGenerator

func MakeGenerator() Generator

MakeGenerator creates Generator

func (Generator) GenerateConf

func (g Generator) GenerateConf(es ...Element) (string, error)

GenerateConf converts array of Element into a configuration.

type InLabel

type InLabel = string

InLabel defines the name of the <label> section in fluentd configuration

type NilElement

type NilElement int
var Nil NilElement

func (NilElement) Name

func (r NilElement) Name() string

func (NilElement) Template

func (r NilElement) Template() string

type Option

type Option struct {
	Name  string
	Value interface{}
}

TODO: unit me with functional.Option

type Options

type Options = utils.Options

Options is a map of Options used to customize the config generation. E.g. Debugging, legacy config generation Deprecated

type OutLabel

type OutLabel = string

OutLabel defined the name of the next @label in the fluentd configuration

type Section

type Section struct {
	Elements []Element
	Comment  string
}

Section is a collection of Elements at a high level division of configuration. e.g. Inputs, Outputs, Ingress etc. It is used to show a breakdown of generated configuration + adding a comment along with the declared section to document the meaning of the section.

Jump to

Keyboard shortcuts

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