Documentation
¶
Index ¶
- Constants
- Variables
- func ConfigPath(name string, file string) string
- func FormatComponentID(name string) string
- func GenerateQuotedPathSegmentArrayStr(fieldPathArray []v1.FieldPath) (string, string)
- func ListenOnAllLocalInterfacesAddress() string
- func MakeID(parts ...string) string
- func MakeInputID(parts ...string) string
- func MakeInputs(in ...string) string
- func MakeOutputID(parts ...string) string
- func MakePipelineID(parts ...string) string
- func MakeRouteInputID(rerouteId, sourceType string) string
- func QuotePathSegments(pathArray []string) []string
- func SecretFrom(secretKey *v1.SecretReference) string
- func SecretPath(secretName string, file string) string
- func SplitPath(path string) []string
- func TrimSpaces(in []string) []string
- type ComponentReceiver
- type InputComponent
Constants ¶
const ( VectorSecretID = "kubernetes_secret" CLFSpec = "clfSpec" )
Variables ¶
var (
Replacer = strings.NewReplacer(" ", "_", "-", "_", ".", "_")
)
Functions ¶
func ConfigPath ¶
ConfigPath is the quoted path for any configmap visible to the collector
func FormatComponentID ¶
func GenerateQuotedPathSegmentArrayStr ¶
GenerateQuotedPathSegmentArrayStr generates the final string of the array of array of path segments and array of flattened path with replaced not allowed symbols to feed into VRL E.g [.kubernetes.namespace_labels."bar/baz0-9.test"] -> ([["kubernetes","namespace_labels","bar/baz0-9.test"]], ["_kubernetes_namespace_labels_bar_baz0-9_test"])
func ListenOnAllLocalInterfacesAddress ¶
func ListenOnAllLocalInterfacesAddress() string
func MakeInputID ¶
MakeInputID for components that logically represent clf.input
func MakeInputs ¶
func MakeOutputID ¶
MakeOutPutID for components that logically represent clf.output
func MakePipelineID ¶
MakePipelineID for components that logically represent clf.pipeline (e.g. filters)
func MakeRouteInputID ¶
MakeRouteInputID appends sourceType to rerouteId for input ids
func QuotePathSegments ¶
QuotePathSegments quotes all path segments as needed for VRL
func SecretFrom ¶
func SecretFrom(secretKey *v1.SecretReference) string
SecretFrom formated string SECRET[<secret_component_id>.<secret_name>#<secret_key>]
func SecretPath ¶
SecretPath is the quoted path for any secret visible to the collector
func SplitPath ¶
SplitPath splits a fieldPath by `.` and reassembles the quoted path segments that also contain `.` Example: `.foo."@some"."d.f.g.o111-22/333".foo_bar` Resultant Array: ["foo","@some",`"d.f.g.o111-22/333"`,"foo_bar"]
func TrimSpaces ¶
Types ¶
type ComponentReceiver ¶
type ComponentReceiver interface {
AddInputFrom(n InputComponent)
}
ComponentReceiver is a vector component that receives input from another component (e.g. transform, sink)
type InputComponent ¶
type InputComponent interface {
// InputIDs are the ids of config elemements to use as input to other components
InputIDs() []string
}
InputComponent is a vector sink, transformation, source that is provided as input to other components