-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
get read-only common configs for custom application #1596
Comments
If you don't want to use Consul to manage your config, you can disable the config provider via the environment variable Then, you can manage your CustomConfig in your file system.
Config example: |
Quick follow up regarding the question above since I'm facing a similar issue with my custom application service. I want to store some messages as metadata in the built-in redis database. However the DB Store of the SDK is only available in the // Create new metadata handler to be used in the functions pipeline
func NewMetadataHandler(config config.Database, credentials config.Credentials) (*MetadataHandler, error) Proposed usage in main.go metadataHandler, err := functions.NewMetadataHandler(app.config.Database, app.config.Credentials)
if err != nil {
app.lc.Errorf("failed load custom configuration: %s", err.Error())
return -1
}
app.service.SetDefaultFunctionsPipeline(metadataHandler.HandleMetadata) Is it possible to either export the DB Store for easy access in custom application functions or at least access the rest of the configuration using the app functions SDK? |
DB Store in App Service is designed for store and forward only, so it should not be exposed. To expose the whole service config, it requires some more effort and we are not able to make it by the current release. You may open an issue with the detailed design and discuss with the Technical Working Group about how to implement it. |
Situation:
Goal:
(es. cdc with database credentials passed from a common configuration)
Given the following snippet of code, I need to populate config.ServiceConfig.Database with service.config.Database , however service properties are not accessible
So I moved the focus on "LoadCustomConfig" function, but it would expect to read common configurations from a Consul.
Otherwise the private configuration is loaded as-is from the default path (res/configuration.yaml)
here's the code I'm referring to:
bootstrap/config/config.go
The text was updated successfully, but these errors were encountered: