This repository has been archived by the owner on May 6, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Prefer injected, typed config over Config #2
Comments
Merged
By "a strongly typed custom configuration instance" do you mean a custom case class, or one of those Scala wrappers of Config? |
ignasi35
changed the title
Prefer injected, typed config over
Prefer injected, typed config over Config
Nov 8, 2018
A custom case class. |
How about mapping the settings to something like:
(just a proposal, we should not use Then: - private[lagom] class ServiceNameMapper(config: Config) {
+ private[lagom] class ServiceNameMapper(config: LagomAkkaDiscoveryConfig) {
- private[lagom] class AkkaDiscoveryHelper(config: Config, serviceDiscovery: ServiceDiscovery)(
+ private[lagom] class AkkaDiscoveryHelper(config: LagomAkkaDiscoveryConfig, serviceDiscovery: ServiceDiscovery)( etc... Most of the complexity in |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
AkkaDiscoveryServiceLocator
uses theConfig
from theActorSystem
. Instead, it should receive a strongly typed custom configuration instance.The text was updated successfully, but these errors were encountered: