config

package
v0.23.2 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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(s string) (*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