Skip to content

Commit

Permalink
chore: make proto orc
Browse files Browse the repository at this point in the history
Signed-off-by: ThibaultFy <[email protected]>
  • Loading branch information
ThibaultFy committed Jan 10, 2024
1 parent 464bd5b commit 95e9311
Show file tree
Hide file tree
Showing 28 changed files with 824 additions and 484 deletions.
37 changes: 19 additions & 18 deletions backend/orchestrator/common_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions backend/orchestrator/common_pb2_grpc.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,16 @@
@generated by mypy-protobuf. Do not edit manually!
isort:skip_file
"""
import abc
import collections.abc
import grpc
import grpc.aio
import typing

_T = typing.TypeVar('_T')

class _MaybeAsyncIterator(collections.abc.AsyncIterator[_T], collections.abc.Iterator[_T], metaclass=abc.ABCMeta):
...

class _ServicerContext(grpc.ServicerContext, grpc.aio.ServicerContext): # type: ignore
...
85 changes: 43 additions & 42 deletions backend/orchestrator/computeplan_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

65 changes: 51 additions & 14 deletions backend/orchestrator/computeplan_pb2_grpc.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,22 @@
isort:skip_file
"""
import abc
import collections.abc
import computeplan_pb2
import grpc
import grpc.aio
import typing

_T = typing.TypeVar('_T')

class _MaybeAsyncIterator(collections.abc.AsyncIterator[_T], collections.abc.Iterator[_T], metaclass=abc.ABCMeta):
...

class _ServicerContext(grpc.ServicerContext, grpc.aio.ServicerContext): # type: ignore
...

class ComputePlanServiceStub:
def __init__(self, channel: grpc.Channel) -> None: ...
def __init__(self, channel: typing.Union[grpc.Channel, grpc.aio.Channel]) -> None: ...
RegisterPlan: grpc.UnaryUnaryMultiCallable[
computeplan_pb2.NewComputePlan,
computeplan_pb2.ComputePlan,
Expand All @@ -33,42 +44,68 @@ class ComputePlanServiceStub:
computeplan_pb2.IsPlanRunningResponse,
]

class ComputePlanServiceAsyncStub:
RegisterPlan: grpc.aio.UnaryUnaryMultiCallable[
computeplan_pb2.NewComputePlan,
computeplan_pb2.ComputePlan,
]
GetPlan: grpc.aio.UnaryUnaryMultiCallable[
computeplan_pb2.GetComputePlanParam,
computeplan_pb2.ComputePlan,
]
ApplyPlanAction: grpc.aio.UnaryUnaryMultiCallable[
computeplan_pb2.ApplyPlanActionParam,
computeplan_pb2.ApplyPlanActionResponse,
]
QueryPlans: grpc.aio.UnaryUnaryMultiCallable[
computeplan_pb2.QueryPlansParam,
computeplan_pb2.QueryPlansResponse,
]
UpdatePlan: grpc.aio.UnaryUnaryMultiCallable[
computeplan_pb2.UpdateComputePlanParam,
computeplan_pb2.UpdateComputePlanResponse,
]
IsPlanRunning: grpc.aio.UnaryUnaryMultiCallable[
computeplan_pb2.IsPlanRunningParam,
computeplan_pb2.IsPlanRunningResponse,
]

class ComputePlanServiceServicer(metaclass=abc.ABCMeta):
@abc.abstractmethod
def RegisterPlan(
self,
request: computeplan_pb2.NewComputePlan,
context: grpc.ServicerContext,
) -> computeplan_pb2.ComputePlan: ...
context: _ServicerContext,
) -> typing.Union[computeplan_pb2.ComputePlan, collections.abc.Awaitable[computeplan_pb2.ComputePlan]]: ...
@abc.abstractmethod
def GetPlan(
self,
request: computeplan_pb2.GetComputePlanParam,
context: grpc.ServicerContext,
) -> computeplan_pb2.ComputePlan: ...
context: _ServicerContext,
) -> typing.Union[computeplan_pb2.ComputePlan, collections.abc.Awaitable[computeplan_pb2.ComputePlan]]: ...
@abc.abstractmethod
def ApplyPlanAction(
self,
request: computeplan_pb2.ApplyPlanActionParam,
context: grpc.ServicerContext,
) -> computeplan_pb2.ApplyPlanActionResponse: ...
context: _ServicerContext,
) -> typing.Union[computeplan_pb2.ApplyPlanActionResponse, collections.abc.Awaitable[computeplan_pb2.ApplyPlanActionResponse]]: ...
@abc.abstractmethod
def QueryPlans(
self,
request: computeplan_pb2.QueryPlansParam,
context: grpc.ServicerContext,
) -> computeplan_pb2.QueryPlansResponse: ...
context: _ServicerContext,
) -> typing.Union[computeplan_pb2.QueryPlansResponse, collections.abc.Awaitable[computeplan_pb2.QueryPlansResponse]]: ...
@abc.abstractmethod
def UpdatePlan(
self,
request: computeplan_pb2.UpdateComputePlanParam,
context: grpc.ServicerContext,
) -> computeplan_pb2.UpdateComputePlanResponse: ...
context: _ServicerContext,
) -> typing.Union[computeplan_pb2.UpdateComputePlanResponse, collections.abc.Awaitable[computeplan_pb2.UpdateComputePlanResponse]]: ...
@abc.abstractmethod
def IsPlanRunning(
self,
request: computeplan_pb2.IsPlanRunningParam,
context: grpc.ServicerContext,
) -> computeplan_pb2.IsPlanRunningResponse: ...
context: _ServicerContext,
) -> typing.Union[computeplan_pb2.IsPlanRunningResponse, collections.abc.Awaitable[computeplan_pb2.IsPlanRunningResponse]]: ...

def add_ComputePlanServiceServicer_to_server(servicer: ComputePlanServiceServicer, server: grpc.Server) -> None: ...
def add_ComputePlanServiceServicer_to_server(servicer: ComputePlanServiceServicer, server: typing.Union[grpc.Server, grpc.aio.Server]) -> None: ...
Loading

0 comments on commit 95e9311

Please sign in to comment.