| | 1 | | // AUTOGENERATED, DO NOT EDIT |
| | 2 | | // Type definitions for server implementations of ports. |
| | 3 | | // package: decentraland.renderer.renderer_services |
| | 4 | | // file: decentraland/renderer/renderer_services/crdt.proto |
| | 5 | | using System.Collections.Generic; |
| | 6 | | using System.Threading; |
| | 7 | | using Cysharp.Threading.Tasks; |
| | 8 | | using Google.Protobuf; |
| | 9 | | using rpc_csharp.protocol; |
| | 10 | | using rpc_csharp; |
| | 11 | | namespace Decentraland.Renderer.RendererServices { |
| | 12 | | public interface ICRDTService<Context> |
| | 13 | | { |
| | 14 | |
|
| | 15 | | UniTask<CRDTResponse> SendCrdt(CRDTManyMessages request, Context context, CancellationToken ct); |
| | 16 | |
|
| | 17 | | UniTask<CRDTManyMessages> PullCrdt(PullCRDTRequest request, Context context, CancellationToken ct); |
| | 18 | |
|
| | 19 | | } |
| | 20 | |
|
| | 21 | | public static class CRDTServiceCodeGen |
| | 22 | | { |
| | 23 | | public const string ServiceName = "CRDTService"; |
| | 24 | |
|
| | 25 | | public static void RegisterService<Context>(RpcServerPort<Context> port, ICRDTService<Context> service) |
| | 26 | | { |
| 3 | 27 | | var result = new ServerModuleDefinition<Context>(); |
| | 28 | |
|
| 3 | 29 | | result.definition.Add("SendCrdt", async (payload, context, ct) => { var res = await service.SendCrdt(CRDTManyMessage |
| 3 | 30 | | result.definition.Add("PullCrdt", async (payload, context, ct) => { var res = await service.PullCrdt(PullCRDTRequest |
| | 31 | |
|
| 3 | 32 | | port.RegisterModule(ServiceName, (port) => UniTask.FromResult(result)); |
| 3 | 33 | | } |
| | 34 | | } |
| | 35 | | } |