-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path__init__.py
More file actions
42 lines (35 loc) · 1.09 KB
/
__init__.py
File metadata and controls
42 lines (35 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Code generated by river.codegen. DO NOT EDIT.
from collections.abc import AsyncIterable, AsyncIterator
from typing import Any
import datetime
from pydantic import TypeAdapter
from replit_river.error_schema import RiverError, RiverErrorTypeAdapter
import replit_river as river
from .rpc_method import (
Rpc_MethodInput,
Rpc_MethodInputTypeAdapter,
Rpc_MethodOutput,
Rpc_MethodOutputTypeAdapter,
encode_Rpc_MethodInput,
)
class Test_ServiceService:
def __init__(self, client: river.Client[Any]):
self.client = client
async def rpc_method(
self,
input: Rpc_MethodInput,
timeout: datetime.timedelta,
) -> Rpc_MethodOutput:
return await self.client.send_rpc(
"test_service",
"rpc_method",
input,
encode_Rpc_MethodInput,
lambda x: Rpc_MethodOutputTypeAdapter.validate_python(
x # type: ignore[arg-type]
),
lambda x: RiverErrorTypeAdapter.validate_python(
x # type: ignore[arg-type]
),
timeout,
)