orbit.client.net.GrpcClient.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of orbit-client Show documentation
Show all versions of orbit-client Show documentation
Orbit is a system to make building highly scalable realtime services easier.
/*
Copyright (C) 2015 - 2019 Electronic Arts Inc. All rights reserved.
This file is part of the Orbit Project .
See license in LICENSE.
*/
package orbit.client.net
import io.grpc.Channel
import io.grpc.ManagedChannelBuilder
import orbit.client.OrbitClientConfig
internal class GrpcClient(localNode: LocalNode, authInterceptor: ClientAuthInterceptor, config: OrbitClientConfig) {
val channel: Channel = ManagedChannelBuilder
.forTarget(localNode.status.grpcEndpoint)
.usePlaintext()
.intercept(authInterceptor)
.enableRetry()
.maxRetryAttempts(config.networkRetryAttempts)
.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy