Help us shape the future of Go! Take the 2026 Go Developer Survey

config

package
v0.31.1 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEmptyConfig = errors.New("empty config")

Functions

This section is empty.

Types

type ComponentReloader

type ComponentReloader struct {
	Name     string
	Reloader func(*Config) error
}

ComponentReloader describes how to reload a component.

type Config

type Config struct {
	RelabelConfigs []*relabel.Config `yaml:"relabel_configs,omitempty"`
}

Config holds all the configuration information for Parca Agent.

func Load

func Load(b []byte) (*Config, error)

Load parses the YAML input s into a Config.

func LoadFile

func LoadFile(filename string) (*Config, error)

LoadFile parses the given YAML file into a Config.

func (Config) String

func (c Config) String() string

type ConfigReloader

type ConfigReloader struct {
	// contains filtered or unexported fields
}

ConfigReloader holds all information required to reload Parca Agent's config into its running components.

func NewConfigReloader

func NewConfigReloader(
	logger log.Logger,
	reg prometheus.Registerer,
	filename string,
	reloaders []ComponentReloader,
) (*ConfigReloader, error)

NewConfigReloader returns an instantiated config reloader.

func (*ConfigReloader) Run

func (r *ConfigReloader) Run(ctx context.Context) error

Run starts watching the config file and wait for reload triggers.

Jump to

Keyboard shortcuts

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