Skip to content

Commit

Permalink
Remove first attempt at gRPC over httpx
Browse files Browse the repository at this point in the history
  • Loading branch information
pelletier committed Jan 29, 2024
1 parent 5d24447 commit fa667b9
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions tests/executor_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,30 +128,3 @@ def client(
) -> ring.coroutine.v1.coroutine_pb2_grpc.ExecutorServiceStub:
channel = HttpxGrpcChannel(http_client)
return ring.coroutine.v1.coroutine_pb2_grpc.ExecutorServiceStub(channel)


# class GrpcHttpxClient:
# """Client for the ring.coroutine.v1.ExecutorService gRPC service over an
# httpx client.
# """

# def __init__(self, http_client: httpx.Client):
# self.http_client = http_client

# def execute(self, request: ring.coroutine.v1.coroutine_pb2.ExecuteRequest) -> ring.coroutine.v1.coroutine_pb2.ExecuteResponse:
# """Execute a coroutine.

# Args:
# request: The request to execute.

# Returns:
# The response from the coroutine.
# """

# response = self.http_client.post(
# "/ring.coroutine.v1.ExecutorService/Execute",
# content=request.SerializeToString(),
# headers={"Content-Type": "application/grpc+proto"},
# )
# response.raise_for_status()
# return ring.coroutine.v1.coroutine_pb2.ExecuteResponse.FromString(response.content)

0 comments on commit fa667b9

Please sign in to comment.