Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.

Commit

Permalink
Added reset method (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
spietras authored Oct 17, 2022
1 parent ca787a6 commit b23a43e
Showing 1 changed file with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
WatchMetricsResponse,
WatchStatusRequest,
WatchStatusResponse,
ResetRequest,
ResetResponse,
)

from kilroy_module_client_py_sdk.metrics import MetricConfig, MetricData
Expand Down Expand Up @@ -300,6 +302,23 @@ async def watch_metrics(
):
yield response

async def reset(
self,
reset_request: "ResetRequest",
*,
timeout: Optional[float] = None,
deadline: Optional["Deadline"] = None,
metadata: Optional["MetadataLike"] = None
) -> "ResetResponse":
return await self._unary_unary(
"/kilroy.module.v1alpha.ModuleService/Reset",
reset_request,
ResetResponse,
timeout=timeout,
deadline=deadline,
metadata=metadata,
)


class ModuleService:
def __init__(self, *args, **kwargs) -> None:
Expand Down Expand Up @@ -431,3 +450,6 @@ async def watch_metrics(
dataset_id=response.dataset_id,
data=json.loads(response.data),
)

async def reset(self, *args, **kwargs) -> None:
await self._stub.reset(ResetRequest(), *args, **kwargs)

0 comments on commit b23a43e

Please sign in to comment.