ni_grpc_extensions.channelpool

gRPC channel pool.

Classes

GrpcChannelPool

Class that manages grpc.Channel lifetimes.

Module Contents

class ni_grpc_extensions.channelpool.GrpcChannelPool[source]

Class that manages grpc.Channel lifetimes.

Initialize the GrpcChannelPool object.

__enter__()[source]

Enter the runtime context of the GrpcChannelPool.

Return type:

Self

__exit__(exc_type, exc_val, traceback)[source]

Exit the runtime context of the GrpcChannelPool.

Parameters:
Return type:

Literal[False]

get_channel(target)[source]

Return a gRPC channel.

Parameters:

target (str) – The server address

Return type:

grpc.Channel

close()[source]

Close channels opened by get_channel().

Return type:

None