fileprovider

package module
v1.29.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2025 License: Apache-2.0 Imports: 6 Imported by: 49

README

File Provider

Status
Stability stable
Distributions core, contrib, k8s, otlp
Issues Open issues Closed issues

Overview

The File Provider takes paths to files and reads their contents as YAML to provide configuration to the Collector.

Usage

The scheme for this provider is file. Usage looks like the following:

file:/path/to/file.yaml

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory added in v0.99.0

func NewFactory() confmap.ProviderFactory

NewFactory returns a factory for a confmap.Provider that reads the configuration from a file.

This Provider supports "file" scheme, and can be called with a "uri" that follows:

file-uri		= "file:" local-path
local-path		= [ drive-letter ] file-path
drive-letter	= ALPHA ":"

The "file-path" can be relative or absolute, and it can be any OS supported format.

Examples: `file:path/to/file` - relative path (unix, windows) `file:/path/to/file` - absolute path (unix, windows) `file:c:/path/to/file` - absolute path including drive-letter (windows) `file:c:\path\to\file` - absolute path including drive-letter (windows)

Types

This section is empty.

Jump to

Keyboard shortcuts

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