def __init__(self, thread_pool, generic_handlers, interceptors, options, maximum_concurrent_rpcs, compression): self._loop = asyncio.get_event_loop() self._server = cygrpc.AioServer(self._loop, thread_pool, generic_handlers, interceptors, options, maximum_concurrent_rpcs, compression)
def __init__(self, thread_pool: Optional[Executor], generic_handlers: Optional[Sequence[grpc.GenericRpcHandler]], interceptors: Optional[Sequence[Any]], options: ChannelArgumentType, maximum_concurrent_rpcs: Optional[int], compression: Optional[grpc.Compression]): self._loop = asyncio.get_event_loop() self._server = cygrpc.AioServer( self._loop, thread_pool, generic_handlers, interceptors, _augment_channel_arguments(options, compression), maximum_concurrent_rpcs)
def __init__(self, thread_pool: Optional[Executor], generic_handlers: Optional[Sequence[grpc.GenericRpcHandler]], interceptors: Optional[Sequence[Any]], options: ChannelArgumentType, maximum_concurrent_rpcs: Optional[int], compression: Optional[grpc.Compression]): self._loop = cygrpc.grpc_aio_loop() if interceptors: invalid_interceptors = [ interceptor for interceptor in interceptors if not isinstance(interceptor, ServerInterceptor) ] if invalid_interceptors: raise ValueError( 'Interceptor must be ServerInterceptor, the ' f'following are invalid: {invalid_interceptors}') self._server = cygrpc.AioServer( self._loop, thread_pool, generic_handlers, interceptors, _augment_channel_arguments(options, compression), maximum_concurrent_rpcs)