Skip to content

feat: Load client config from arbitrary config block#1974

Merged
johanandren merged 3 commits intomainfrom
wip-client-settings-from-arbitrary-config
Sep 9, 2024
Merged

feat: Load client config from arbitrary config block#1974
johanandren merged 3 commits intomainfrom
wip-client-settings-from-arbitrary-config

Conversation

@johanandren
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Contributor

@patriknw patriknw left a comment

Choose a reason for hiding this comment

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

thanks, that would be useful

@johanandren johanandren marked this pull request as ready for review September 6, 2024 13:47
@johanandren johanandren requested a review from patriknw September 9, 2024 14:36
Copy link
Copy Markdown
Contributor

@patriknw patriknw left a comment

Choose a reason for hiding this comment

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

LGTM

def fromConfig(clientName: String, config: Config)(
implicit actorSystem: ClassicActorSystemProvider): GrpcClientSettings = {
// Use config named "*" by default
val defaultServiceConfig = actorSystem.classicSystem.settings.config.getConfig("akka.grpc.client.\"*\"")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I was considering if this should be config.withFallback(actorSystem.classicSystem.settings.config) in case the given config also overrides default config, but fine to not support that kind of override.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hmm, yeah, maybe not a bad idea.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Let's leave that and revisit in case we figure out that it is very useful.

@johanandren johanandren merged commit ee25c69 into main Sep 9, 2024
@johanandren johanandren deleted the wip-client-settings-from-arbitrary-config branch September 9, 2024 15:30
@johanandren johanandren added this to the 2.4.4 milestone Sep 9, 2024
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