|
1 | | -import { discovery1 } from '@cloudquery/plugin-pb-javascript'; |
2 | | -import { pluginV3 } from '@cloudquery/plugin-pb-javascript'; |
3 | 1 | import grpc = require('@grpc/grpc-js'); |
4 | | - |
5 | | -class DiscoveryServer extends discovery1.cloudquery.discovery.v1.UnimplementedDiscoveryService { |
6 | | - GetVersions( |
7 | | - call: grpc.ServerUnaryCall< |
8 | | - discovery1.cloudquery.discovery.v1.GetVersions.Request, |
9 | | - discovery1.cloudquery.discovery.v1.GetVersions.Response |
10 | | - >, |
11 | | - callback: grpc.sendUnaryData<discovery1.cloudquery.discovery.v1.GetVersions.Response>, |
12 | | - ): void { |
13 | | - throw new Error('Method not implemented.'); |
14 | | - } |
15 | | -} |
16 | | - |
17 | | -class PluginServer extends pluginV3.cloudquery.plugin.v3.UnimplementedPluginService { |
18 | | - GetName( |
19 | | - call: grpc.ServerUnaryCall< |
20 | | - pluginV3.cloudquery.plugin.v3.GetName.Request, |
21 | | - pluginV3.cloudquery.plugin.v3.GetName.Response |
22 | | - >, |
23 | | - callback: grpc.sendUnaryData<pluginV3.cloudquery.plugin.v3.GetName.Response>, |
24 | | - ): void { |
25 | | - throw new Error('Method not implemented.'); |
26 | | - } |
27 | | - GetVersion( |
28 | | - call: grpc.ServerUnaryCall< |
29 | | - pluginV3.cloudquery.plugin.v3.GetVersion.Request, |
30 | | - pluginV3.cloudquery.plugin.v3.GetVersion.Response |
31 | | - >, |
32 | | - callback: grpc.sendUnaryData<pluginV3.cloudquery.plugin.v3.GetVersion.Response>, |
33 | | - ): void { |
34 | | - throw new Error('Method not implemented.'); |
35 | | - } |
36 | | - Init( |
37 | | - call: grpc.ServerUnaryCall<pluginV3.cloudquery.plugin.v3.Init.Request, pluginV3.cloudquery.plugin.v3.Init.Response>, |
38 | | - callback: grpc.sendUnaryData<pluginV3.cloudquery.plugin.v3.Init.Response>, |
39 | | - ): void { |
40 | | - throw new Error('Method not implemented.'); |
41 | | - } |
42 | | - GetTables( |
43 | | - call: grpc.ServerUnaryCall< |
44 | | - pluginV3.cloudquery.plugin.v3.GetTables.Request, |
45 | | - pluginV3.cloudquery.plugin.v3.GetTables.Response |
46 | | - >, |
47 | | - callback: grpc.sendUnaryData<pluginV3.cloudquery.plugin.v3.GetTables.Response>, |
48 | | - ): void { |
49 | | - throw new Error('Method not implemented.'); |
50 | | - } |
51 | | - Sync( |
52 | | - call: grpc.ServerWritableStream< |
53 | | - pluginV3.cloudquery.plugin.v3.Sync.Request, |
54 | | - pluginV3.cloudquery.plugin.v3.Sync.Response |
55 | | - >, |
56 | | - ): void { |
57 | | - throw new Error('Method not implemented.'); |
58 | | - } |
59 | | - Read( |
60 | | - call: grpc.ServerWritableStream< |
61 | | - pluginV3.cloudquery.plugin.v3.Read.Request, |
62 | | - pluginV3.cloudquery.plugin.v3.Read.Response |
63 | | - >, |
64 | | - ): void { |
65 | | - throw new Error('Method not implemented.'); |
66 | | - } |
67 | | - Write( |
68 | | - call: grpc.ServerReadableStream< |
69 | | - pluginV3.cloudquery.plugin.v3.Write.Request, |
70 | | - pluginV3.cloudquery.plugin.v3.Write.Response |
71 | | - >, |
72 | | - callback: grpc.sendUnaryData<pluginV3.cloudquery.plugin.v3.Write.Response>, |
73 | | - ): void { |
74 | | - throw new Error('Method not implemented.'); |
75 | | - } |
76 | | - Close( |
77 | | - call: grpc.ServerUnaryCall< |
78 | | - pluginV3.cloudquery.plugin.v3.Close.Request, |
79 | | - pluginV3.cloudquery.plugin.v3.Close.Response |
80 | | - >, |
81 | | - callback: grpc.sendUnaryData<pluginV3.cloudquery.plugin.v3.Close.Response>, |
82 | | - ): void { |
83 | | - throw new Error('Method not implemented.'); |
84 | | - } |
85 | | -} |
| 2 | +import { pluginV3 } from '@cloudquery/plugin-pb-javascript'; |
| 3 | +import { discovery1 } from '@cloudquery/plugin-pb-javascript'; |
| 4 | +import { PluginServer } from './plugin.js'; |
| 5 | +import { DiscoveryServer } from './discovery.js'; |
86 | 6 |
|
87 | 7 | export const getServer = () => { |
88 | 8 | const server = new grpc.Server(); |
|
0 commit comments