Documentation ¶
Overview ¶
Package azappconfig loads configuration from Azure App Configuration.
It requires following roles to access Azure App Configuration:
- App Configuration Data Reader
Change notification ¶
By default, it periodically polls the configuration only. It also listens to change events by register it to notifier with Cloud Event schema.
Only following events trigger polling the configuration and other type of events are ignored:
- Microsoft.AppConfiguration.KeyValueModified
- Microsoft.AppConfiguration.KeyValueDeleted
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppConfig ¶
type AppConfig struct {
// contains filtered or unexported fields
}
AppConfig is a Provider that loads configuration from Azure App Configuration.
To create a new AppConfig, call New.
type Option ¶
type Option func(options *options)
Option configures the AppConfig with specific options.
func WithCredential ¶
func WithCredential(credential azcore.TokenCredential) Option
WithCredential provides the azcore.TokenCredential for Azure authentication.
By default, it uses azidentity.DefaultAzureCredential.
func WithKeyFilter ¶
WithKeyFilter provides key filter that will be used to select a set of configuration setting entities.
func WithKeySplitter ¶
WithKeySplitter provides the function used to split setting key into nested path. If it returns an nil/[]string{}/[]string{""}, the variable will be ignored.
For example, with the default splitter, a key like "parent/child/key" would be split into "parent", "child", and "key".
func WithLabelFilter ¶
WithLabelFilter provides label filter that will be used to select a set of configuration setting entities.
func WithPollInterval ¶
WithPollInterval provides the interval for polling the configuration.
The default interval is 1 minute.