opampprovider

package module
v0.99.0-sumo-0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0, MIT Imports: 10 Imported by: 1

Documentation

Overview

Copyright The OpenTelemetry Authors

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	SchemeName = "opamp"
)

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() confmap.ProviderFactory

func NewWithSettings

func NewWithSettings(settings confmap.ProviderSettings) confmap.Provider

New creates a new Provider, with its GlobProvider set to the result of globprovider.New().

Types

type ConfigFragment

type ConfigFragment struct {
	Extensions struct {
		OpAmp struct {
			RemoteConfigurationDirectory string `yaml:"remote_configuration_directory"`
		} `yaml:"opamp"`
	} `yaml:"extensions"`
}

ConfigFragment is part of a larger opamp configuration structure. To avoid creating a dependency on other packages, we only specify what is needed for the OpAmp provider to work.

func (ConfigFragment) ConfigDir

func (c ConfigFragment) ConfigDir() string

func (ConfigFragment) Validate

func (c ConfigFragment) Validate() error

type Provider

type Provider struct {
	GlobProvider confmap.Provider
}

Provider is an OpAmp configuration provider. It requires a GlobProvider to load the contents of the supplied remote configuration directory.

func (*Provider) Retrieve

func (p *Provider) Retrieve(ctx context.Context, configPath string, fn confmap.WatcherFunc) (*confmap.Retrieved, error)

func (*Provider) Scheme

func (*Provider) Scheme() string

func (*Provider) Shutdown

func (p *Provider) Shutdown(ctx context.Context) error

Jump to

Keyboard shortcuts

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