简体   繁体   English

启用 tls 的 twitter finagle redis 客户端的配置

[英]configuration of twitter finagle redis client with tls enabled

How do I configure the finagle Redis client with tls-enabled?如何配置启用 tls 的 finagle Redis 客户端?

    @Provides
def providesRedisClient(@Flag("redis-addr") host: String): redis.Client = {
    redis.Client(host)
}

as the function we used only took redis-endpiont.由于我们使用的 function 只使用了 redis-endpiont。

found following solution (just replace redis.Client(host) with the code below):找到以下解决方案(只需将 redis.Client(host) 替换为以下代码):

redis.Client(Redis.client.withTransport.tls(host).newClient(host))

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM