Skip to content

//misk/misk.client

Package-level declarations

Types

Name Summary
BackwardsCompatibleClientsConfig [jvm]
data class BackwardsCompatibleClientsConfig@JvmOverloadsconstructor(val defaultConnectTimeout: Duration? = null, val defaultWriteTimeout: Duration? = null, val defaultReadTimeout: Duration? = null, val ssl: HttpClientSSLConfig? = null, val defaultPingInterval: Duration? = null, val defaultCallTimeout: Duration? = null, val endpoints: Map<String, BackwardsCompatibleEndpointConfig> = mapOf(), val hostConfigs: LinkedHashMap<String, HttpClientConfig> = linkedMapOf(), val logRequests: Boolean = false)
BackwardsCompatibleClientsConfigConverter [jvm]
class BackwardsCompatibleClientsConfigConverter : Converter<BackwardsCompatibleClientsConfig, HttpClientsConfig>
BackwardsCompatibleEndpointConfig [jvm]
data class BackwardsCompatibleEndpointConfig@JvmOverloadsconstructor(val url: String? = null, val envoy: HttpClientEnvoyConfig? = null, val connectTimeout: Duration? = null, val writeTimeout: Duration? = null, val readTimeout: Duration? = null, val pingInterval: Duration? = null, val callTimeout: Duration? = null, val maxRequests: Int = 128, val maxRequestsPerHost: Int = 32, val maxIdleConnections: Int = 100, val keepAliveDuration: Duration = Duration.ofMinutes(5), val ssl: HttpClientSSLConfig? = null, val clientConfig: HttpClientConfig? = null)
BeginClientCallChain [jvm]
interface BeginClientCallChain
CallFactoryWrapper [jvm]
interface CallFactoryWrapper
CallFactoryWrapper is a way to extend the functionality of the okhttp3.Call.Factory instance injected to typed http clients and gRPC clients created by TypedClientFactoryProvider and GrpcClientProvider.
ClientApplicationInterceptorFactory [jvm]
interface ClientApplicationInterceptorFactory
ClientChain [jvm]
interface ClientChain
ClientMetricsInterceptor [jvm]
class ClientMetricsInterceptor : Interceptor
ClientNetworkInterceptorsModule [jvm]
class ClientNetworkInterceptorsModule : KAbstractModule
The common set of ClientNetworkInterceptors for all misk apps.
GrpcClientModule [jvm]
class GrpcClientModule<T : Service, G : T>@JvmOverloadsconstructor(kclass: KClass<T>, grpcClientClass: KClass<G>, name: String, annotation: Annotation? = null, minMessageToCompress: Long = 0) : KAbstractModule
Creates a gRPC client given a Wire-generated interface and HTTP configuration.
HttpClientConfig [jvm]
data class HttpClientConfig@JvmOverloadsconstructor(val connectTimeout: Duration? = null, val writeTimeout: Duration? = null, val readTimeout: Duration? = null, val pingInterval: Duration? = null, val callTimeout: Duration? = null, val maxRequests: Int? = null, val maxRequestsPerHost: Int? = null, val maxIdleConnections: Int? = null, val keepAliveDuration: Duration? = null, val ssl: HttpClientSSLConfig? = null, val unixSocketFile: String? = null, val protocols: List<String>? = null, val retryOnConnectionFailure: Boolean? = null)
HttpClientConfigUrlProvider [jvm]
class HttpClientConfigUrlProvider@Injectconstructor
Calculates the url for an http client config, which can differ depending on if the client is envoy-based or connects directly.
HttpClientEndpointConfig [jvm]
data class HttpClientEndpointConfig@JvmOverloadsconstructor(val url: String? = null, val envoy: HttpClientEnvoyConfig? = null, val clientConfig: HttpClientConfig = HttpClientConfig())
HttpClientEnvoyConfig [jvm]
data class HttpClientEnvoyConfig@JvmOverloadsconstructor(val app: String, val env: String? = null)
HttpClientFactory [jvm]
@Singleton
class HttpClientFactory@Injectconstructor(sslLoader: SslLoader, sslContextFactory: SslContextFactory, okHttpClientCommonConfigurator: OkHttpClientCommonConfigurator)
HttpClientModule [jvm]
class HttpClientModule@JvmOverloadsconstructor(name: String, annotation: Annotation? = null) : KAbstractModule
Provides an OkHttpClient and ProtoMessageHttpClient for a peer service
HttpClientsConfig [jvm]
data class HttpClientsConfig@JvmOverloadsconstructor(val hostConfigs: LinkedHashMap<String, HttpClientConfig> = linkedMapOf(), val endpoints: Map<String, HttpClientEndpointConfig> = mapOf(), val logRequests: Boolean = false) : Config
HttpClientsConfigModule [jvm]
class HttpClientsConfigModule(config: HttpClientsConfig) : KAbstractModule
HttpClientSSLConfig [jvm]
data class HttpClientSSLConfig(val cert_store: CertStoreConfig?, val trust_store: TrustStoreConfig)
JettyPortPeerClientModule [jvm]
class JettyPortPeerClientModule : KAbstractModule
For testing.
OkHttpClientCommonConfigurator [jvm]
class OkHttpClientCommonConfigurator@Injectconstructor
PeerClientFactory [jvm]
class PeerClientFactory(appName: String, httpClientsConfig: HttpClientsConfig, httpClientFactory: HttpClientFactory, httpsPort: Int)
Factory that creates OkHttpClients for connecting to another instance of the same application running in the same cluster.
PeerClientModule [jvm]
class PeerClientModule : KAbstractModule
Binds a PeerClientFactory that calls peers on the HTTPS port of this process’s server, as determined by the SSL port in the WebConfig.
ProtoMessageHttpClient [jvm]
class ProtoMessageHttpClient(baseUrl: String, moshi: Moshi, okHttp: OkHttpClient)
This helper class is for making HTTP requests to an endpoint that handles protobuf Message classes.
TypedClientFactory [jvm]
class TypedClientFactory@Injectconstructor
TypedHttpClientModule [jvm]
class TypedHttpClientModule<T : Any>@JvmOverloadsconstructor(kclass: KClass<T>, name: String, annotation: Annotation? = null, retrofitBuilderProvider: Provider<Retrofit.Builder>? = null) : KAbstractModule
Creates a retrofit-backed typed client given an API interface and an HTTP configuration.
TypedPeerClientFactory [jvm]
interface TypedPeerClientFactory<T>
Factory for creating typed clients that call other members of a cluster.
TypedPeerHttpClientModule [jvm]
class TypedPeerHttpClientModule<T : Any>@JvmOverloadsconstructor(kclass: KClass<T>, name: String, retrofitBuilderProvider: Provider<Retrofit.Builder>? = null) : KAbstractModule
Creates a retrofit-backed typed client factory given an API interface and an HTTP configuration.

Functions

Name Summary
applyDefaults [jvm]
fun HttpClientConfig.applyDefaults(other: HttpClientConfig): HttpClientConfig