def _make_grpc_provider(self, addr): options = [ ("grpc.max_receive_message_length", 1024 * 1024 * 256), ] channel = grpc.insecure_channel(addr, options=options) stub = grpc_provider.make_stub(channel) provider = grpc_provider.GrpcDataProvider(addr, stub) return provider
def _make_provider(addr): options = [ ("grpc.max_receive_message_length", 1024 * 1024 * 256), ] creds = grpc.local_channel_credentials() channel = grpc.secure_channel(addr, creds, options=options) stub = grpc_provider.make_stub(channel) return grpc_provider.GrpcDataProvider(addr, stub)
def _make_provider(addr, channel_creds_type): (creds, options) = channel_creds_type.channel_config() options.append(("grpc.max_receive_message_length", 1024 * 1024 * 256)) channel = grpc.secure_channel(addr, creds, options=options) stub = grpc_provider.make_stub(channel) return grpc_provider.GrpcDataProvider(addr, stub)