Skip to content
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

Implement ConfigProvider interface on *Config type #107

Merged

Conversation

jlegrone
Copy link
Contributor

What was changed

The Config struct now implements the ConfigProvider interface.

Why?

This is convenient for users who just want to supply hardcoded config, eg. Temporalite.

Checklist

  1. Closes

  2. How was this tested:

  1. Any docs updates needed?

@jlegrone jlegrone force-pushed the jlegrone/config-config-provider branch from 832c032 to d7aaf54 Compare February 25, 2022 21:40
Comment on lines +99 to +101
func (c *Config) GetConfig() (*Config, error) {
return c, nil
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could also call the Validate method here and bubble up any error, but I figure that makes more sense for the server to do at startup rather than push the responsibility into every ConfigProvider implementation.

@feedmeapples feedmeapples self-requested a review February 26, 2022 01:02
@feedmeapples feedmeapples merged commit 9804b43 into temporalio:main Feb 26, 2022
@jlegrone jlegrone deleted the jlegrone/config-config-provider branch February 26, 2022 03:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants