Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeConfig ¶
Types ¶
type Provider ¶
type Provider interface {
// Retrieve goes to the configuration source and retrieves the selected data which
// contains the value to be injected in the configuration and the corresponding watcher that
// will be used to monitor for updates of the retrieved value.
//
// If ctx is cancelled should return immediately with an error.
// Should never be called concurrently with itself or with Shutdown.
Retrieve(ctx context.Context, path string) (*Retrieved, error)
// Scheme returns the scheme used by Retrieve.
Scheme() string
// Shutdown signals that the configuration for which this Provider was used to
// retrieve values is no longer in use and the Provider should close and release
// any resources that it may have created.
//
// This method must be called when the Collector service ends, either in case of
// success or error. Retrieve cannot be called after Shutdown.
//
// Should never be called concurrently with itself or with Retrieve.
// If ctx is cancelled should return immediately with an error.
Shutdown(ctx context.Context) error
}
type Retrieved ¶
type Retrieved struct {
// contains filtered or unexported fields
}
Retrieved holds the result of a call to the Retrieve method of a Provider object.
func NewRetrieved ¶
NewRetrieved returns a new Retrieved instance that contains the data from the raw deserialized config. The rawConf can be one of the following types:
- Primitives: int, int32, int64, float32, float64, bool, string;
- []any;
- map[string]any;
Click to show internal directories.
Click to hide internal directories.