GrpcClient

Available in a dev version: 0․11․0-grpc-186

How to configure

fun GrpcClient(hostname: String, port: Int, configure: GrpcClientConfiguration.() -> Unit = {}): GrpcClient(source)

Creates and configures a gRPC client instance.

This function initializes a new gRPC client with the specified target server and allows optional customization of the client's configuration through a configuration block.

Return

A new instance of GrpcClient configured with the specified target and options.

Parameters

hostname

The gRPC server hostname to connect to.

port

The gRPC server port to connect to.

configure

An optional configuration block to customize the GrpcClientConfiguration. This can include setting up interceptors, specifying credentials, customizing message marshaller resolution, and overriding default authority.

See also


fun GrpcClient(target: String, configure: GrpcClientConfiguration.() -> Unit = {}): GrpcClient(source)

Creates and configures a gRPC client instance.

This function initializes a new gRPC client with the specified target server and allows optional customization of the client's configuration through a configuration block.

Return

A new instance of GrpcClient configured with the specified target and options.

Parameters

target

The gRPC server endpoint to connect to, typically specified in the format hostname:port.

configure

An optional configuration block to customize the GrpcClientConfiguration. This can include setting up interceptors, specifying credentials, customizing message marshaller resolution, and overriding default authority.

See also