pjfanning commented on code in PR #349:
URL:
https://github.com/apache/pekko-persistence-dynamodb/pull/349#discussion_r3744606966
##########
src/main/scala/org/apache/pekko/persistence/dynamodb/DynamoDBConfig.scala:
##########
@@ -37,50 +33,4 @@ trait DynamoDBConfig {
}
-class DynamoDBClientConfig(c: Config) extends ClientConfig {
- private val cc = c.getConfig("aws-client-config")
- private def get[T](path: String, extract: (Config, String) => T, set: T =>
Unit): Unit =
- if (cc.getString(path) == "default") ()
- else {
- val value = extract(cc, path)
- set(value)
- foundSettings ::= s"$path:$value"
- }
-
- private var foundSettings = List.empty[String]
- override lazy val toString: String = foundSettings.reverse.mkString("{",
",", "}")
- val config = new ClientConfiguration
-
- get("client-execution-timeout", _.getInt(_),
config.setClientExecutionTimeout)
- get("connection-max-idle-millis", _.getLong(_),
config.setConnectionMaxIdleMillis)
- get("connection-timeout", _.getInt(_), config.setConnectionTimeout)
- get("connection-ttl", _.getLong(_), config.setConnectionTTL)
- get("local-address", (c, p) => InetAddress.getByName(c.getString(p)),
config.setLocalAddress)
- get("max-connections", _.getInt(_), config.setMaxConnections)
- get("max-error-retry", _.getInt(_), config.setMaxErrorRetry)
- get("preemptive-basic-proxy-auth", _.getBoolean(_),
config.withPreemptiveBasicProxyAuth)
- get("protocol", (c, p) => if (c.getString(p) == "HTTP") Protocol.HTTP else
Protocol.HTTPS, config.setProtocol)
- get("proxy-domain", _.getString(_), config.setProxyDomain)
- get("proxy-host", _.getString(_), config.setProxyHost)
- get("proxy-password", _.getString(_), config.setProxyPassword)
- get("proxy-port", _.getInt(_), config.setProxyPort)
- get("proxy-username", _.getString(_), config.setProxyUsername)
- get("proxy-workstation", _.getString(_), config.setProxyWorkstation)
- get("request-timeout", _.getInt(_), config.setRequestTimeout)
- get("response-metadata-cache-size", _.getInt(_),
config.setResponseMetadataCacheSize)
- get("signer-override", _.getString(_), config.setSignerOverride)
- get[(Int, Int)](
- "socket-buffer-size-hints",
- (c, p) => {
- val tuple = c.getIntList(p)
- require(tuple.size == 2, "socket-buffer-size-hints must be a list of two
integers")
- (tuple.get(0), tuple.get(1))
- },
- pair => config.setSocketBufferSizeHints(pair._1, pair._2))
- get("socket-timeout", _.getInt(_), config.setSocketTimeout)
- get("use-expect-continue", _.getBoolean(_), config.setUseExpectContinue)
- get("use-gzip", _.getBoolean(_), config.setUseExpectContinue)
- get("use-reaper", _.getBoolean(_), config.setUseReaper)
- get("use-tcp-keepalive", _.getBoolean(_), config.setUseTcpKeepAlive)
- get("user-agent", _.getString(_), config.setUserAgentPrefix)
-}
+class DynamoDBClientConfig(c: Config) extends ClientConfig
Review Comment:
removed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]