final class GrpcClientSettings extends AnyRef
- Annotations
- @ApiMayChange()
- Source
- GrpcClientSettings.scala
- Alphabetic
- By Inheritance
- GrpcClientSettings
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- val backend: String
- val callCredentials: Option[CallCredentials]
- val channelBuilderOverrides: (NettyChannelBuilder) => NettyChannelBuilder
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- val connectionAttempts: Option[Int]
- val deadline: Duration
- val defaultPort: Int
- val discoveryRefreshInterval: Option[FiniteDuration]
- val eagerConnection: Boolean
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val loadBalancingPolicy: Option[String]
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val overrideAuthority: Option[String]
- val resolveTimeout: FiniteDuration
- val serviceDiscovery: ServiceDiscovery
- val serviceName: String
- val servicePortName: Option[String]
- val serviceProtocol: Option[String]
- val sslContext: Option[SSLContext]
- val sslContextProvider: Option[() => SSLContext]
- val sslProvider: Option[SslProvider]
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- val trustManager: Option[TrustManager]
- val useTls: Boolean
- val userAgent: Option[String]
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def withBackend(value: String): GrpcClientSettings
- Annotations
- @ApiMayChange()
- def withCallCredentials(value: CallCredentials): GrpcClientSettings
- def withChannelBuilderOverrides(builderOverrides: (NettyChannelBuilder) => NettyChannelBuilder): GrpcClientSettings
To override any default channel configurations used by netty.
To override any default channel configurations used by netty. Only for power users. API may change when io.grpc:grpc-netty-shaded is replaced by io.grpc:grpc-core and Akka HTTP.
- Annotations
- @ApiMayChange()
- def withConnectionAttempts(value: Int): GrpcClientSettings
How many times to retry establishing a connection before failing the client Failure can be monitored using client.stopped and monitoring the Future/CompletionStage.
How many times to retry establishing a connection before failing the client Failure can be monitored using client.stopped and monitoring the Future/CompletionStage. An exponentially increasing backoff is used between attempts.
- def withDeadline(value: Duration): GrpcClientSettings
Each call will have this deadline.
- def withDeadline(value: Duration): GrpcClientSettings
Each call will have this deadline.
- def withDefaultPort(value: Int): GrpcClientSettings
If using ServiceDiscovery and no port is returned use this one.
- def withDiscoveryRefreshInterval(refreshInterval: Duration): GrpcClientSettings
Java API: Set this to a duration to trigger periodic refresh of the resolved endpoints, evicting cached entries if the discovery mechanism supports that.
Java API: Set this to a duration to trigger periodic refresh of the resolved endpoints, evicting cached entries if the discovery mechanism supports that. The default is no periodic refresh and instead only does refresh when the client implementation decides to.
Currently only supported by the Netty client backend.
- Annotations
- @ApiMayChange()
- def withDiscoveryRefreshInterval(refreshInterval: FiniteDuration): GrpcClientSettings
Scala API: Set this to a duration to trigger periodic refresh of the resolved endpoints, evicting cached entries if the discovery mechanism supports that.
Scala API: Set this to a duration to trigger periodic refresh of the resolved endpoints, evicting cached entries if the discovery mechanism supports that. The default is no periodic refresh and instead * only does refresh when the client implementation decides to.
Currently only supported by the Netty client backend.
- Annotations
- @ApiMayChange()
- def withEagerConnection(eagerConnection: Boolean): GrpcClientSettings
Request that the client try to connect the service immediately when the client is created rather than on the first request.
Request that the client try to connect the service immediately when the client is created rather than on the first request. Only supported for the Netty client backend, the akka-http client backend is always eager.
- def withLoadBalancingPolicy(loadBalancingPolicy: String): GrpcClientSettings
- def withOverrideAuthority(value: String): GrpcClientSettings
- def withResolveTimeout(value: FiniteDuration): GrpcClientSettings
- def withServicePortName(servicePortName: String): GrpcClientSettings
When using service discovery, port name is the optional parameter to filter the requests.
When using service discovery, port name is the optional parameter to filter the requests. Looking up a service may return multiple ports (http/https/...) if the remote process only serves the grpc service on a specific port you must use this setting.
- def withServiceProtocol(serviceProtocol: String): GrpcClientSettings
- def withSslContext(sslContext: SSLContext): GrpcClientSettings
- def withSslContextCreator(provider: Creator[SSLContext]): GrpcClientSettings
Java API: For each new client connection, invoke this provider to set up TLS, useful for example for using rotating certs for the client provided by
SSLContextFactory.refreshingSSLEngineProvider
.Java API: For each new client connection, invoke this provider to set up TLS, useful for example for using rotating certs for the client provided by
SSLContextFactory.refreshingSSLEngineProvider
.When setting this the other TLS settings (
sslContext
,tlsManager
) must not be set. - def withSslContextProvider(provider: () => SSLContext): GrpcClientSettings
Scala API: For each new client connection, invoke this provider to set up TLS, useful for example for using rotating certs for the client provided by
SSLContextFactory.refreshingSSLEngineProvider
.Scala API: For each new client connection, invoke this provider to set up TLS, useful for example for using rotating certs for the client provided by
SSLContextFactory.refreshingSSLEngineProvider
.When setting this the other TLS settings (
sslContext
,tlsManager
) must not be set. - def withSslProvider(sslProvider: SslProvider): GrpcClientSettings
Note: Netty client backend specific setting
- def withTls(enabled: Boolean): GrpcClientSettings
Set to false to use unencrypted HTTP/2.
Set to false to use unencrypted HTTP/2. This should not be used in production system.
- def withTrustManager(trustManager: TrustManager): GrpcClientSettings
- def withUserAgent(value: String): GrpcClientSettings
Provides a custom
User-Agent
for the application.Provides a custom
User-Agent
for the application.It's an optional parameter. The library will provide a user agent independent of this option. If provided, the given agent will prepend the library's user agent information.
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)
- def withGrpcLoadBalancingType(loadBalancingType: String): GrpcClientSettings
- Annotations
- @deprecated
- Deprecated
(Since version 1.0.0) use withLoadBalancingPolicy