converter

package
v0.34.3 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package converter exposes utilities to convert config files from other programs to Grafana Agent Flow configurations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Convert

func Convert(in []byte, kind Input) ([]byte, diag.Diagnostics)

Convert generates a Grafana Agent Flow config given an input configuration file.

Conversions are made as literally as possible, so the resulting config files may be unoptimized (i.e., lacking component reuse). A converted config file should just be the starting point rather than the final destination.

Note that not all functionality defined in the input configuration may have an equivalent in Grafana Agent Flow. If the conversion could not complete because of mismatched functionality, an error is returned with no resulting config. If the conversion completed successfully but generated warnings, an error is returned alongside the resulting config.

Types

type Input

type Input string

Input represents the type of config file being fed into the converter.

const (
	// InputPrometheus indicates that the input file is a prometheus.yaml file.
	InputPrometheus Input = "prometheus"
)

Directories

Path Synopsis
Package diag exposes error types used throughout converter and a method to pretty-print them to the screen.
Package diag exposes error types used throughout converter and a method to pretty-print them to the screen.
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳