config

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package config implements a component to handle agent configuration. This component wraps Viper.

The component's Setup method must be called before any other components which might call is other methods. This is typically accomplished by calling Setup from an application-level `fx.Invoke`.

Index

Constants

This section is empty.

Variables

View Source
var Module = fx.Module(
	"comp/config",
	fx.Provide(newConfig),
)

Module defines the fx options for this component.

Functions

This section is empty.

Types

type Component

type Component interface {
	// Setup sets up the component.  It must be called before any of the other
	// methods.
	Setup(configFilePath string)

	// GetInt gets an integer-typed config parameter value.
	GetInt(key string) int

	// GetBool gets an integer-typed config parameter value.
	GetBool(key string) bool

	// GetInt gets a string-typed config parameter value.
	GetString(key string) string
}

Component is the component type.

Jump to

Keyboard shortcuts

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