@streamr/dht 0.0.1-tatum.7 → 100.0.0-pretestnet.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/connection/ConnectionLockRpcRemote.d.ts +10 -0
- package/dist/src/connection/{RemoteConnectionLocker.js → ConnectionLockRpcRemote.js} +20 -35
- package/dist/src/connection/ConnectionLockRpcRemote.js.map +1 -0
- package/dist/src/connection/ConnectionManager.d.ts +0 -1
- package/dist/src/connection/ConnectionManager.js +27 -25
- package/dist/src/connection/ConnectionManager.js.map +1 -1
- package/dist/src/connection/ConnectivityChecker.js +4 -4
- package/dist/src/connection/ConnectivityChecker.js.map +1 -1
- package/dist/src/connection/ConnectorFacade.d.ts +1 -1
- package/dist/src/connection/ConnectorFacade.js +5 -8
- package/dist/src/connection/ConnectorFacade.js.map +1 -1
- package/dist/src/connection/Handshaker.d.ts +1 -2
- package/dist/src/connection/Handshaker.js +1 -4
- package/dist/src/connection/Handshaker.js.map +1 -1
- package/dist/src/connection/ManagedConnection.d.ts +1 -2
- package/dist/src/connection/ManagedConnection.js +4 -5
- package/dist/src/connection/ManagedConnection.js.map +1 -1
- package/dist/src/connection/ManagedWebRtcConnection.d.ts +1 -1
- package/dist/src/connection/ManagedWebRtcConnection.js +2 -2
- package/dist/src/connection/ManagedWebRtcConnection.js.map +1 -1
- package/dist/src/connection/Simulator/SimulatorConnector.d.ts +1 -2
- package/dist/src/connection/Simulator/SimulatorConnector.js +3 -4
- package/dist/src/connection/Simulator/SimulatorConnector.js.map +1 -1
- package/dist/src/connection/WebRTC/NodeWebRtcConnection.d.ts +1 -1
- package/dist/src/connection/WebRTC/{WebRtcConnector.d.ts → WebRtcConnectorRpcLocal.d.ts} +9 -9
- package/dist/src/connection/WebRTC/{WebRtcConnector.js → WebRtcConnectorRpcLocal.js} +38 -30
- package/dist/src/connection/WebRTC/WebRtcConnectorRpcLocal.js.map +1 -0
- package/dist/src/connection/WebRTC/WebRtcConnectorRpcRemote.d.ts +11 -0
- package/dist/src/connection/WebRTC/WebRtcConnectorRpcRemote.js +55 -0
- package/dist/src/connection/WebRTC/WebRtcConnectorRpcRemote.js.map +1 -0
- package/dist/src/connection/WebRTC/iceServerAsString.d.ts +1 -1
- package/dist/src/connection/WebSocket/{WebSocketConnector.d.ts → WebSocketConnectorRpcLocal.d.ts} +6 -7
- package/dist/src/connection/WebSocket/{WebSocketConnector.js → WebSocketConnectorRpcLocal.js} +20 -20
- package/dist/src/connection/WebSocket/WebSocketConnectorRpcLocal.js.map +1 -0
- package/dist/src/connection/WebSocket/WebSocketConnectorRpcRemote.d.ts +8 -0
- package/dist/src/connection/WebSocket/{RemoteWebSocketConnector.js → WebSocketConnectorRpcRemote.js} +11 -16
- package/dist/src/connection/WebSocket/WebSocketConnectorRpcRemote.js.map +1 -0
- package/dist/src/dht/DhtNode.d.ts +6 -7
- package/dist/src/dht/DhtNode.js +22 -23
- package/dist/src/dht/DhtNode.js.map +1 -1
- package/dist/src/dht/{RemoteExternalApi.d.ts → ExternalApiRpcRemote.d.ts} +2 -2
- package/dist/src/dht/{RemoteExternalApi.js → ExternalApiRpcRemote.js} +5 -6
- package/dist/src/dht/ExternalApiRpcRemote.js.map +1 -0
- package/dist/src/dht/discovery/PeerDiscovery.d.ts +1 -1
- package/dist/src/dht/discovery/PeerDiscovery.js +3 -2
- package/dist/src/dht/discovery/PeerDiscovery.js.map +1 -1
- package/dist/src/dht/find/RecursiveFindSession.d.ts +5 -5
- package/dist/src/dht/find/RecursiveFindSession.js +7 -7
- package/dist/src/dht/find/RecursiveFindSession.js.map +1 -1
- package/dist/src/dht/find/RecursiveFinder.d.ts +7 -7
- package/dist/src/dht/find/RecursiveFinder.js +24 -24
- package/dist/src/dht/find/RecursiveFinder.js.map +1 -1
- package/dist/src/dht/find/RemoteRecursiveFindSession.d.ts +1 -1
- package/dist/src/dht/find/RemoteRecursiveFindSession.js +4 -4
- package/dist/src/dht/find/RemoteRecursiveFindSession.js.map +1 -1
- package/dist/src/dht/registerExternalApiRpcMethods.js +4 -3
- package/dist/src/dht/registerExternalApiRpcMethods.js.map +1 -1
- package/dist/src/dht/routing/Router.d.ts +2 -2
- package/dist/src/dht/routing/Router.js +2 -4
- package/dist/src/dht/routing/Router.js.map +1 -1
- package/dist/src/dht/routing/{RemoteRouter.d.ts → RouterRpcRemote.d.ts} +2 -2
- package/dist/src/dht/routing/{RemoteRouter.js → RouterRpcRemote.js} +4 -4
- package/dist/src/dht/routing/RouterRpcRemote.js.map +1 -0
- package/dist/src/dht/routing/RoutingSession.js +2 -2
- package/dist/src/dht/routing/RoutingSession.js.map +1 -1
- package/dist/src/dht/store/{DataStore.d.ts → StoreRpcLocal.d.ts} +4 -4
- package/dist/src/dht/store/{DataStore.js → StoreRpcLocal.js} +27 -27
- package/dist/src/dht/store/StoreRpcLocal.js.map +1 -0
- package/dist/src/dht/store/{RemoteStore.d.ts → StoreRpcRemote.d.ts} +2 -2
- package/dist/src/dht/store/{RemoteStore.js → StoreRpcRemote.js} +4 -4
- package/dist/src/dht/store/StoreRpcRemote.js.map +1 -0
- package/dist/src/exports.d.ts +1 -1
- package/dist/src/helpers/protoClasses.js +2 -2
- package/dist/src/helpers/protoClasses.js.map +1 -1
- package/dist/src/proto/packages/dht/protos/DhtRpc.client.d.ts +29 -29
- package/dist/src/proto/packages/dht/protos/DhtRpc.client.js +39 -39
- package/dist/src/proto/packages/dht/protos/DhtRpc.client.js.map +1 -1
- package/dist/src/proto/packages/dht/protos/DhtRpc.d.ts +49 -158
- package/dist/src/proto/packages/dht/protos/DhtRpc.js +46 -86
- package/dist/src/proto/packages/dht/protos/DhtRpc.js.map +1 -1
- package/dist/src/proto/packages/dht/protos/DhtRpc.server.d.ts +15 -15
- package/dist/src/transport/RoutingRpcCommunicator.js +1 -0
- package/dist/src/transport/RoutingRpcCommunicator.js.map +1 -1
- package/package.json +4 -4
- package/protos/DhtRpc.proto +30 -59
- package/src/connection/ConnectionLockRpcRemote.ts +62 -0
- package/src/connection/ConnectionManager.ts +33 -32
- package/src/connection/ConnectivityChecker.ts +1 -1
- package/src/connection/ConnectorFacade.ts +7 -10
- package/src/connection/Handshaker.ts +0 -5
- package/src/connection/ManagedConnection.ts +3 -6
- package/src/connection/ManagedWebRtcConnection.ts +0 -2
- package/src/connection/Simulator/SimulatorConnector.ts +2 -7
- package/src/connection/WebRTC/BrowserWebRtcConnection.ts +1 -1
- package/src/connection/WebRTC/NodeWebRtcConnection.ts +1 -1
- package/src/connection/WebRTC/{WebRtcConnector.ts → WebRtcConnectorRpcLocal.ts} +46 -34
- package/src/connection/WebRTC/WebRtcConnectorRpcRemote.ts +71 -0
- package/src/connection/WebRTC/iceServerAsString.ts +1 -1
- package/src/connection/WebSocket/{WebSocketConnector.ts → WebSocketConnectorRpcLocal.ts} +26 -26
- package/src/connection/WebSocket/{RemoteWebSocketConnector.ts → WebSocketConnectorRpcRemote.ts} +13 -18
- package/src/dht/DhtNode.ts +32 -33
- package/src/dht/{RemoteExternalApi.ts → ExternalApiRpcRemote.ts} +3 -4
- package/src/dht/discovery/PeerDiscovery.ts +4 -3
- package/src/dht/find/RecursiveFindSession.ts +11 -11
- package/src/dht/find/RecursiveFinder.ts +29 -30
- package/src/dht/find/RemoteRecursiveFindSession.ts +6 -6
- package/src/dht/registerExternalApiRpcMethods.ts +7 -4
- package/src/dht/routing/Router.ts +4 -6
- package/src/dht/routing/{RemoteRouter.ts → RouterRpcRemote.ts} +2 -2
- package/src/dht/routing/RoutingSession.ts +6 -6
- package/src/dht/store/{DataStore.ts → StoreRpcLocal.ts} +31 -31
- package/src/dht/store/{RemoteStore.ts → StoreRpcRemote.ts} +2 -2
- package/src/exports.ts +1 -1
- package/src/helpers/protoClasses.ts +4 -4
- package/src/proto/packages/dht/protos/DhtRpc.client.ts +54 -54
- package/src/proto/packages/dht/protos/DhtRpc.server.ts +15 -15
- package/src/proto/packages/dht/protos/DhtRpc.ts +76 -210
- package/src/transport/RoutingRpcCommunicator.ts +1 -0
- package/test/integration/{RemoteRouter.test.ts → RouterRpcRemote.test.ts} +8 -8
- package/test/integration/{RemoteStore.test.ts → StoreRpcRemote.test.ts} +13 -13
- package/test/integration/WebRtcConnectorRpc.test.ts +11 -24
- package/test/integration/WebSocketConnectorRpc.test.ts +8 -12
- package/test/unit/RecursiveFinder.test.ts +5 -6
- package/test/unit/{WebSocketConnector.test.ts → WebSocketConnectorRpcLocal.test.ts} +3 -3
- package/test/unit/webrtcReplaceInternalIpWithExternalIp.test.ts +1 -1
- package/test/utils/utils.ts +16 -26
- package/dist/src/connection/RemoteConnectionLocker.d.ts +0 -13
- package/dist/src/connection/RemoteConnectionLocker.js.map +0 -1
- package/dist/src/connection/WebRTC/RemoteWebrtcConnector.d.ts +0 -12
- package/dist/src/connection/WebRTC/RemoteWebrtcConnector.js +0 -74
- package/dist/src/connection/WebRTC/RemoteWebrtcConnector.js.map +0 -1
- package/dist/src/connection/WebRTC/WebRtcConnector.js.map +0 -1
- package/dist/src/connection/WebSocket/RemoteWebSocketConnector.d.ts +0 -9
- package/dist/src/connection/WebSocket/RemoteWebSocketConnector.js.map +0 -1
- package/dist/src/connection/WebSocket/WebSocketConnector.js.map +0 -1
- package/dist/src/dht/RemoteExternalApi.js.map +0 -1
- package/dist/src/dht/routing/RemoteRouter.js.map +0 -1
- package/dist/src/dht/store/DataStore.js.map +0 -1
- package/dist/src/dht/store/RemoteStore.js.map +0 -1
- package/src/connection/RemoteConnectionLocker.ts +0 -85
- package/src/connection/WebRTC/RemoteWebrtcConnector.ts +0 -93
|
@@ -6,9 +6,9 @@ import { Logger } from '@streamr/utils'
|
|
|
6
6
|
import EventEmitter from 'eventemitter3'
|
|
7
7
|
import { v4 } from 'uuid'
|
|
8
8
|
import { PeerDescriptor, RouteMessageWrapper } from '../../proto/packages/dht/protos/DhtRpc'
|
|
9
|
-
import {
|
|
9
|
+
import { RouterRpcRemote } from './RouterRpcRemote'
|
|
10
10
|
import { RoutingRpcCommunicator } from '../../transport/RoutingRpcCommunicator'
|
|
11
|
-
import {
|
|
11
|
+
import { RouterRpcClient } from '../../proto/packages/dht/protos/DhtRpc.client'
|
|
12
12
|
import { toProtoRpcClient } from '@streamr/proto-rpc'
|
|
13
13
|
import { Contact } from '../contact/Contact'
|
|
14
14
|
|
|
@@ -18,19 +18,19 @@ const MAX_FAILED_HOPS = 2
|
|
|
18
18
|
|
|
19
19
|
class RemoteContact extends Contact {
|
|
20
20
|
|
|
21
|
-
private router:
|
|
21
|
+
private router: RouterRpcRemote
|
|
22
22
|
|
|
23
23
|
constructor(peer: RemoteDhtNode, ownPeerDescriptor: PeerDescriptor, rpcCommunicator: RoutingRpcCommunicator) {
|
|
24
24
|
super(peer.getPeerDescriptor())
|
|
25
|
-
this.router = new
|
|
25
|
+
this.router = new RouterRpcRemote(
|
|
26
26
|
ownPeerDescriptor,
|
|
27
27
|
peer.getPeerDescriptor(),
|
|
28
28
|
peer.getServiceId(),
|
|
29
|
-
toProtoRpcClient(new
|
|
29
|
+
toProtoRpcClient(new RouterRpcClient(rpcCommunicator.getRpcClientTransport()))
|
|
30
30
|
)
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
getRouter():
|
|
33
|
+
getRouter(): RouterRpcRemote {
|
|
34
34
|
return this.router
|
|
35
35
|
}
|
|
36
36
|
}
|
|
@@ -7,14 +7,14 @@ import { Any } from '../../proto/google/protobuf/any'
|
|
|
7
7
|
import { ServerCallContext } from '@protobuf-ts/runtime-rpc'
|
|
8
8
|
import { DhtCallContext } from '../../rpc-protocol/DhtCallContext'
|
|
9
9
|
import { toProtoRpcClient } from '@streamr/proto-rpc'
|
|
10
|
-
import {
|
|
10
|
+
import { StoreRpcClient } from '../../proto/packages/dht/protos/DhtRpc.client'
|
|
11
11
|
import { RoutingRpcCommunicator } from '../../transport/RoutingRpcCommunicator'
|
|
12
12
|
import { IRecursiveFinder } from '../find/RecursiveFinder'
|
|
13
13
|
import { areEqualPeerDescriptors, keyFromPeerDescriptor, peerIdFromPeerDescriptor } from '../../helpers/peerIdFromPeerDescriptor'
|
|
14
14
|
import { Logger } from '@streamr/utils'
|
|
15
15
|
import { LocalDataStore } from './LocalDataStore'
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
16
|
+
import { IStoreRpc } from '../../proto/packages/dht/protos/DhtRpc.server'
|
|
17
|
+
import { StoreRpcRemote } from './StoreRpcRemote'
|
|
18
18
|
import { Timestamp } from '../../proto/google/protobuf/timestamp'
|
|
19
19
|
import EventEmitter from 'eventemitter3'
|
|
20
20
|
import { Events } from '../DhtNode'
|
|
@@ -30,14 +30,14 @@ interface DataStoreConfig {
|
|
|
30
30
|
serviceId: string
|
|
31
31
|
maxTtl: number
|
|
32
32
|
highestTtl: number
|
|
33
|
-
|
|
33
|
+
redundancyFactor: number
|
|
34
34
|
dhtNodeEmitter: EventEmitter<Events>
|
|
35
35
|
getNodesClosestToIdFromBucket: (id: Uint8Array, n?: number) => RemoteDhtNode[]
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
const logger = new Logger(module)
|
|
39
39
|
|
|
40
|
-
export class
|
|
40
|
+
export class StoreRpcLocal implements IStoreRpc {
|
|
41
41
|
|
|
42
42
|
private readonly rpcCommunicator: RoutingRpcCommunicator
|
|
43
43
|
private readonly recursiveFinder: IRecursiveFinder
|
|
@@ -46,7 +46,7 @@ export class DataStore implements IStoreService {
|
|
|
46
46
|
private readonly serviceId: string
|
|
47
47
|
private readonly maxTtl: number
|
|
48
48
|
private readonly highestTtl: number
|
|
49
|
-
private readonly
|
|
49
|
+
private readonly redundancyFactor: number
|
|
50
50
|
private readonly dhtNodeEmitter: EventEmitter<Events>
|
|
51
51
|
private readonly getNodesClosestToIdFromBucket: (id: Uint8Array, n?: number) => RemoteDhtNode[]
|
|
52
52
|
|
|
@@ -58,7 +58,7 @@ export class DataStore implements IStoreService {
|
|
|
58
58
|
this.serviceId = config.serviceId
|
|
59
59
|
this.maxTtl = config.maxTtl
|
|
60
60
|
this.highestTtl = config.highestTtl
|
|
61
|
-
this.
|
|
61
|
+
this.redundancyFactor = config.redundancyFactor
|
|
62
62
|
this.dhtNodeEmitter = config.dhtNodeEmitter
|
|
63
63
|
this.getNodesClosestToIdFromBucket = config.getNodesClosestToIdFromBucket
|
|
64
64
|
this.rpcCommunicator.registerRpcMethod(StoreDataRequest, StoreDataResponse, 'storeData',
|
|
@@ -114,10 +114,10 @@ export class DataStore implements IStoreService {
|
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
// if new node is within the
|
|
117
|
+
// if new node is within the storageRedundancyFactor closest nodes to the data
|
|
118
118
|
// do migrate data to it
|
|
119
119
|
|
|
120
|
-
if (index < this.
|
|
120
|
+
if (index < this.redundancyFactor) {
|
|
121
121
|
this.localDataStore.setStale(dataId, dataEntry.storer!, false)
|
|
122
122
|
return true
|
|
123
123
|
} else {
|
|
@@ -127,19 +127,19 @@ export class DataStore implements IStoreService {
|
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
private async migrateDataToContact(dataEntry: DataEntry, contact: PeerDescriptor, doNotConnect: boolean = false): Promise<void> {
|
|
130
|
-
const
|
|
130
|
+
const rpcRemote = new StoreRpcRemote(
|
|
131
131
|
this.ownPeerDescriptor,
|
|
132
132
|
contact,
|
|
133
133
|
this.serviceId,
|
|
134
|
-
toProtoRpcClient(new
|
|
134
|
+
toProtoRpcClient(new StoreRpcClient(this.rpcCommunicator.getRpcClientTransport()))
|
|
135
135
|
)
|
|
136
136
|
try {
|
|
137
|
-
const response = await
|
|
137
|
+
const response = await rpcRemote.migrateData({ dataEntry }, doNotConnect)
|
|
138
138
|
if (response.error) {
|
|
139
|
-
logger.trace('
|
|
139
|
+
logger.trace('migrateData() returned error: ' + response.error)
|
|
140
140
|
}
|
|
141
141
|
} catch (e) {
|
|
142
|
-
logger.trace('
|
|
142
|
+
logger.trace('migrateData() threw an exception ' + e)
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
145
|
|
|
@@ -150,7 +150,7 @@ export class DataStore implements IStoreService {
|
|
|
150
150
|
const successfulNodes: PeerDescriptor[] = []
|
|
151
151
|
const ttl = this.highestTtl // ToDo: make TTL decrease according to some nice curve
|
|
152
152
|
const storerTime = Timestamp.now()
|
|
153
|
-
for (let i = 0; i < closestNodes.length && successfulNodes.length < this.
|
|
153
|
+
for (let i = 0; i < closestNodes.length && successfulNodes.length < this.redundancyFactor; i++) {
|
|
154
154
|
if (areEqualPeerDescriptors(this.ownPeerDescriptor, closestNodes[i])) {
|
|
155
155
|
this.localDataStore.storeEntry({
|
|
156
156
|
kademliaId: key,
|
|
@@ -165,22 +165,22 @@ export class DataStore implements IStoreService {
|
|
|
165
165
|
successfulNodes.push(closestNodes[i])
|
|
166
166
|
continue
|
|
167
167
|
}
|
|
168
|
-
const
|
|
168
|
+
const rpcRemote = new StoreRpcRemote(
|
|
169
169
|
this.ownPeerDescriptor,
|
|
170
170
|
closestNodes[i],
|
|
171
171
|
this.serviceId,
|
|
172
|
-
toProtoRpcClient(new
|
|
172
|
+
toProtoRpcClient(new StoreRpcClient(this.rpcCommunicator.getRpcClientTransport()))
|
|
173
173
|
)
|
|
174
174
|
try {
|
|
175
|
-
const response = await
|
|
175
|
+
const response = await rpcRemote.storeData({ kademliaId: key, data, ttl, storerTime })
|
|
176
176
|
if (!response.error) {
|
|
177
177
|
successfulNodes.push(closestNodes[i])
|
|
178
|
-
logger.trace('
|
|
178
|
+
logger.trace('remote.storeData() returned success')
|
|
179
179
|
} else {
|
|
180
|
-
logger.trace('
|
|
180
|
+
logger.trace('remote.storeData() returned error: ' + response.error)
|
|
181
181
|
}
|
|
182
182
|
} catch (e) {
|
|
183
|
-
logger.trace('
|
|
183
|
+
logger.trace('remote.storeData() threw an exception ' + e)
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
186
|
return successfulNodes
|
|
@@ -188,8 +188,8 @@ export class DataStore implements IStoreService {
|
|
|
188
188
|
|
|
189
189
|
private selfIsOneOfClosestPeers(dataId: Uint8Array): boolean {
|
|
190
190
|
const ownPeerId = PeerID.fromValue(this.ownPeerDescriptor.kademliaId)
|
|
191
|
-
const closestPeers = this.getNodesClosestToIdFromBucket(dataId, this.
|
|
192
|
-
const sortedList = new SortedContactList<Contact>(ownPeerId, this.
|
|
191
|
+
const closestPeers = this.getNodesClosestToIdFromBucket(dataId, this.redundancyFactor)
|
|
192
|
+
const sortedList = new SortedContactList<Contact>(ownPeerId, this.redundancyFactor, undefined, true)
|
|
193
193
|
sortedList.addContact(new Contact(this.ownPeerDescriptor))
|
|
194
194
|
closestPeers.forEach((con) => sortedList.addContact(new Contact(con.getPeerDescriptor())))
|
|
195
195
|
return sortedList.getClosestContacts().some((node) => node.getPeerId().equals(ownPeerId))
|
|
@@ -200,28 +200,28 @@ export class DataStore implements IStoreService {
|
|
|
200
200
|
const result = await this.recursiveFinder.startRecursiveFind(key)
|
|
201
201
|
const closestNodes = result.closestNodes
|
|
202
202
|
const successfulNodes: PeerDescriptor[] = []
|
|
203
|
-
for (let i = 0; i < closestNodes.length && successfulNodes.length < this.
|
|
203
|
+
for (let i = 0; i < closestNodes.length && successfulNodes.length < this.redundancyFactor; i++) {
|
|
204
204
|
if (areEqualPeerDescriptors(this.ownPeerDescriptor, closestNodes[i])) {
|
|
205
205
|
this.localDataStore.markAsDeleted(key, peerIdFromPeerDescriptor(this.ownPeerDescriptor))
|
|
206
206
|
successfulNodes.push(closestNodes[i])
|
|
207
207
|
continue
|
|
208
208
|
}
|
|
209
|
-
const
|
|
209
|
+
const rpcRemote = new StoreRpcRemote(
|
|
210
210
|
this.ownPeerDescriptor,
|
|
211
211
|
closestNodes[i],
|
|
212
212
|
this.serviceId,
|
|
213
|
-
toProtoRpcClient(new
|
|
213
|
+
toProtoRpcClient(new StoreRpcClient(this.rpcCommunicator.getRpcClientTransport()))
|
|
214
214
|
)
|
|
215
215
|
try {
|
|
216
|
-
const response = await
|
|
216
|
+
const response = await rpcRemote.deleteData({ kademliaId: key })
|
|
217
217
|
if (response.deleted) {
|
|
218
|
-
logger.trace('
|
|
218
|
+
logger.trace('remote.deleteData() returned success')
|
|
219
219
|
} else {
|
|
220
220
|
logger.trace('could not delete data from ' + keyFromPeerDescriptor(closestNodes[i]))
|
|
221
221
|
}
|
|
222
222
|
successfulNodes.push(closestNodes[i])
|
|
223
223
|
} catch (e) {
|
|
224
|
-
logger.trace('
|
|
224
|
+
logger.trace('remote.deleteData() threw an exception ' + e)
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
227
|
}
|
|
@@ -283,7 +283,7 @@ export class DataStore implements IStoreService {
|
|
|
283
283
|
const incomingPeerId = PeerID.fromValue(incomingPeer.kademliaId)
|
|
284
284
|
const closestToData = this.getNodesClosestToIdFromBucket(dataEntry.kademliaId, 10)
|
|
285
285
|
|
|
286
|
-
const sortedList = new SortedContactList<Contact>(dataId, this.
|
|
286
|
+
const sortedList = new SortedContactList<Contact>(dataId, this.redundancyFactor, undefined, true)
|
|
287
287
|
sortedList.addContact(new Contact(this.ownPeerDescriptor))
|
|
288
288
|
|
|
289
289
|
closestToData.forEach((con) => {
|
|
@@ -307,7 +307,7 @@ export class DataStore implements IStoreService {
|
|
|
307
307
|
})
|
|
308
308
|
}
|
|
309
309
|
} else {
|
|
310
|
-
// if we are the closest to the data, migrate to all
|
|
310
|
+
// if we are the closest to the data, migrate to all storageRedundancyFactor nearest
|
|
311
311
|
sortedList.getAllContacts().forEach((contact) => {
|
|
312
312
|
const contactPeerId = PeerID.fromValue(contact.getPeerDescriptor().kademliaId)
|
|
313
313
|
if (!incomingPeerId.equals(contactPeerId) && !ownPeerId.equals(contactPeerId)) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Remote } from '../contact/Remote'
|
|
2
|
-
import {
|
|
2
|
+
import { IStoreRpcClient } from '../../proto/packages/dht/protos/DhtRpc.client'
|
|
3
3
|
import {
|
|
4
4
|
DeleteDataRequest,
|
|
5
5
|
DeleteDataResponse,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from '../../proto/packages/dht/protos/DhtRpc'
|
|
11
11
|
import { keyFromPeerDescriptor } from '../../helpers/peerIdFromPeerDescriptor'
|
|
12
12
|
|
|
13
|
-
export class
|
|
13
|
+
export class StoreRpcRemote extends Remote<IStoreRpcClient> {
|
|
14
14
|
|
|
15
15
|
async storeData(request: StoreDataRequest): Promise<StoreDataResponse> {
|
|
16
16
|
const options = this.formDhtRpcOptions({
|
package/src/exports.ts
CHANGED
|
@@ -9,5 +9,5 @@ export { ConnectionManager, ConnectionLocker, PortRange, TlsCertificate } from '
|
|
|
9
9
|
export { DhtRpcOptions } from './rpc-protocol/DhtRpcOptions'
|
|
10
10
|
export { Remote } from './dht/contact/Remote'
|
|
11
11
|
export { areEqualPeerDescriptors } from './helpers/peerIdFromPeerDescriptor'
|
|
12
|
-
export { IceServer } from './connection/WebRTC/
|
|
12
|
+
export { IceServer } from './connection/WebRTC/WebRtcConnectorRpcLocal'
|
|
13
13
|
export { DhtCallContext } from './rpc-protocol/DhtCallContext'
|
|
@@ -13,8 +13,8 @@ import {
|
|
|
13
13
|
PeerDescriptor,
|
|
14
14
|
PingRequest,
|
|
15
15
|
PingResponse,
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
FindResponse,
|
|
17
|
+
FindRequest,
|
|
18
18
|
RouteMessageAck,
|
|
19
19
|
RouteMessageWrapper,
|
|
20
20
|
WebSocketConnectionRequest,
|
|
@@ -32,8 +32,8 @@ import {
|
|
|
32
32
|
export const protoClasses: Array<IMessageType<any>> = [
|
|
33
33
|
ClosestPeersRequest,
|
|
34
34
|
ClosestPeersResponse,
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
FindRequest,
|
|
36
|
+
FindResponse,
|
|
37
37
|
PingRequest,
|
|
38
38
|
PingResponse,
|
|
39
39
|
LeaveNotice,
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
// @generated by protobuf-ts 2.9.1 with parameter server_generic,generate_dependencies,long_type_number
|
|
2
2
|
// @generated from protobuf file "packages/dht/protos/DhtRpc.proto" (package "dht", syntax proto3)
|
|
3
3
|
// tslint:disable
|
|
4
|
-
import {
|
|
4
|
+
import { ExternalApiRpc } from "./DhtRpc";
|
|
5
5
|
import type { ExternalStoreDataResponse } from "./DhtRpc";
|
|
6
6
|
import type { ExternalStoreDataRequest } from "./DhtRpc";
|
|
7
7
|
import type { FindDataResponse } from "./DhtRpc";
|
|
8
8
|
import type { FindDataRequest } from "./DhtRpc";
|
|
9
|
-
import {
|
|
9
|
+
import { ConnectionLockRpc } from "./DhtRpc";
|
|
10
10
|
import type { DisconnectNoticeResponse } from "./DhtRpc";
|
|
11
11
|
import type { DisconnectNotice } from "./DhtRpc";
|
|
12
12
|
import type { UnlockRequest } from "./DhtRpc";
|
|
13
13
|
import type { LockResponse } from "./DhtRpc";
|
|
14
14
|
import type { LockRequest } from "./DhtRpc";
|
|
15
|
-
import {
|
|
15
|
+
import { WebRtcConnectorRpc } from "./DhtRpc";
|
|
16
16
|
import type { IceCandidate } from "./DhtRpc";
|
|
17
17
|
import type { RtcAnswer } from "./DhtRpc";
|
|
18
18
|
import type { RtcOffer } from "./DhtRpc";
|
|
19
19
|
import type { WebRtcConnectionRequest } from "./DhtRpc";
|
|
20
|
-
import {
|
|
20
|
+
import { WebSocketConnectorRpc } from "./DhtRpc";
|
|
21
21
|
import type { WebSocketConnectionResponse } from "./DhtRpc";
|
|
22
22
|
import type { WebSocketConnectionRequest } from "./DhtRpc";
|
|
23
23
|
import { RecursiveFindSessionService } from "./DhtRpc";
|
|
24
|
-
import type {
|
|
25
|
-
import {
|
|
24
|
+
import type { FindResponse } from "./DhtRpc";
|
|
25
|
+
import { StoreRpc } from "./DhtRpc";
|
|
26
26
|
import type { DeleteDataResponse } from "./DhtRpc";
|
|
27
27
|
import type { DeleteDataRequest } from "./DhtRpc";
|
|
28
28
|
import type { MigrateDataResponse } from "./DhtRpc";
|
|
29
29
|
import type { MigrateDataRequest } from "./DhtRpc";
|
|
30
30
|
import type { StoreDataResponse } from "./DhtRpc";
|
|
31
31
|
import type { StoreDataRequest } from "./DhtRpc";
|
|
32
|
-
import {
|
|
32
|
+
import { RouterRpc } from "./DhtRpc";
|
|
33
33
|
import type { RouteMessageAck } from "./DhtRpc";
|
|
34
34
|
import type { RouteMessageWrapper } from "./DhtRpc";
|
|
35
35
|
import type { RpcTransport } from "@protobuf-ts/runtime-rpc";
|
|
@@ -93,9 +93,9 @@ export class DhtRpcServiceClient implements IDhtRpcServiceClient, ServiceInfo {
|
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
/**
|
|
96
|
-
* @generated from protobuf service dht.
|
|
96
|
+
* @generated from protobuf service dht.RouterRpc
|
|
97
97
|
*/
|
|
98
|
-
export interface
|
|
98
|
+
export interface IRouterRpcClient {
|
|
99
99
|
/**
|
|
100
100
|
* @generated from protobuf rpc: routeMessage(dht.RouteMessageWrapper) returns (dht.RouteMessageAck);
|
|
101
101
|
*/
|
|
@@ -110,12 +110,12 @@ export interface IRoutingServiceClient {
|
|
|
110
110
|
findRecursively(input: RouteMessageWrapper, options?: RpcOptions): UnaryCall<RouteMessageWrapper, RouteMessageAck>;
|
|
111
111
|
}
|
|
112
112
|
/**
|
|
113
|
-
* @generated from protobuf service dht.
|
|
113
|
+
* @generated from protobuf service dht.RouterRpc
|
|
114
114
|
*/
|
|
115
|
-
export class
|
|
116
|
-
typeName =
|
|
117
|
-
methods =
|
|
118
|
-
options =
|
|
115
|
+
export class RouterRpcClient implements IRouterRpcClient, ServiceInfo {
|
|
116
|
+
typeName = RouterRpc.typeName;
|
|
117
|
+
methods = RouterRpc.methods;
|
|
118
|
+
options = RouterRpc.options;
|
|
119
119
|
constructor(private readonly _transport: RpcTransport) {
|
|
120
120
|
}
|
|
121
121
|
/**
|
|
@@ -141,9 +141,9 @@ export class RoutingServiceClient implements IRoutingServiceClient, ServiceInfo
|
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
/**
|
|
144
|
-
* @generated from protobuf service dht.
|
|
144
|
+
* @generated from protobuf service dht.StoreRpc
|
|
145
145
|
*/
|
|
146
|
-
export interface
|
|
146
|
+
export interface IStoreRpcClient {
|
|
147
147
|
/**
|
|
148
148
|
* @generated from protobuf rpc: storeData(dht.StoreDataRequest) returns (dht.StoreDataResponse);
|
|
149
149
|
*/
|
|
@@ -158,12 +158,12 @@ export interface IStoreServiceClient {
|
|
|
158
158
|
deleteData(input: DeleteDataRequest, options?: RpcOptions): UnaryCall<DeleteDataRequest, DeleteDataResponse>;
|
|
159
159
|
}
|
|
160
160
|
/**
|
|
161
|
-
* @generated from protobuf service dht.
|
|
161
|
+
* @generated from protobuf service dht.StoreRpc
|
|
162
162
|
*/
|
|
163
|
-
export class
|
|
164
|
-
typeName =
|
|
165
|
-
methods =
|
|
166
|
-
options =
|
|
163
|
+
export class StoreRpcClient implements IStoreRpcClient, ServiceInfo {
|
|
164
|
+
typeName = StoreRpc.typeName;
|
|
165
|
+
methods = StoreRpc.methods;
|
|
166
|
+
options = StoreRpc.options;
|
|
167
167
|
constructor(private readonly _transport: RpcTransport) {
|
|
168
168
|
}
|
|
169
169
|
/**
|
|
@@ -193,9 +193,9 @@ export class StoreServiceClient implements IStoreServiceClient, ServiceInfo {
|
|
|
193
193
|
*/
|
|
194
194
|
export interface IRecursiveFindSessionServiceClient {
|
|
195
195
|
/**
|
|
196
|
-
* @generated from protobuf rpc:
|
|
196
|
+
* @generated from protobuf rpc: sendFindResponse(dht.FindResponse) returns (google.protobuf.Empty);
|
|
197
197
|
*/
|
|
198
|
-
|
|
198
|
+
sendFindResponse(input: FindResponse, options?: RpcOptions): UnaryCall<FindResponse, Empty>;
|
|
199
199
|
}
|
|
200
200
|
/**
|
|
201
201
|
* @generated from protobuf service dht.RecursiveFindSessionService
|
|
@@ -207,29 +207,29 @@ export class RecursiveFindSessionServiceClient implements IRecursiveFindSessionS
|
|
|
207
207
|
constructor(private readonly _transport: RpcTransport) {
|
|
208
208
|
}
|
|
209
209
|
/**
|
|
210
|
-
* @generated from protobuf rpc:
|
|
210
|
+
* @generated from protobuf rpc: sendFindResponse(dht.FindResponse) returns (google.protobuf.Empty);
|
|
211
211
|
*/
|
|
212
|
-
|
|
212
|
+
sendFindResponse(input: FindResponse, options?: RpcOptions): UnaryCall<FindResponse, Empty> {
|
|
213
213
|
const method = this.methods[0], opt = this._transport.mergeOptions(options);
|
|
214
|
-
return stackIntercept<
|
|
214
|
+
return stackIntercept<FindResponse, Empty>("unary", this._transport, method, opt, input);
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
217
|
/**
|
|
218
|
-
* @generated from protobuf service dht.
|
|
218
|
+
* @generated from protobuf service dht.WebSocketConnectorRpc
|
|
219
219
|
*/
|
|
220
|
-
export interface
|
|
220
|
+
export interface IWebSocketConnectorRpcClient {
|
|
221
221
|
/**
|
|
222
222
|
* @generated from protobuf rpc: requestConnection(dht.WebSocketConnectionRequest) returns (dht.WebSocketConnectionResponse);
|
|
223
223
|
*/
|
|
224
224
|
requestConnection(input: WebSocketConnectionRequest, options?: RpcOptions): UnaryCall<WebSocketConnectionRequest, WebSocketConnectionResponse>;
|
|
225
225
|
}
|
|
226
226
|
/**
|
|
227
|
-
* @generated from protobuf service dht.
|
|
227
|
+
* @generated from protobuf service dht.WebSocketConnectorRpc
|
|
228
228
|
*/
|
|
229
|
-
export class
|
|
230
|
-
typeName =
|
|
231
|
-
methods =
|
|
232
|
-
options =
|
|
229
|
+
export class WebSocketConnectorRpcClient implements IWebSocketConnectorRpcClient, ServiceInfo {
|
|
230
|
+
typeName = WebSocketConnectorRpc.typeName;
|
|
231
|
+
methods = WebSocketConnectorRpc.methods;
|
|
232
|
+
options = WebSocketConnectorRpc.options;
|
|
233
233
|
constructor(private readonly _transport: RpcTransport) {
|
|
234
234
|
}
|
|
235
235
|
/**
|
|
@@ -241,9 +241,9 @@ export class WebSocketConnectorServiceClient implements IWebSocketConnectorServi
|
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
243
|
/**
|
|
244
|
-
* @generated from protobuf service dht.
|
|
244
|
+
* @generated from protobuf service dht.WebRtcConnectorRpc
|
|
245
245
|
*/
|
|
246
|
-
export interface
|
|
246
|
+
export interface IWebRtcConnectorRpcClient {
|
|
247
247
|
/**
|
|
248
248
|
* @generated from protobuf rpc: requestConnection(dht.WebRtcConnectionRequest) returns (google.protobuf.Empty);
|
|
249
249
|
*/
|
|
@@ -262,12 +262,12 @@ export interface IWebRtcConnectorServiceClient {
|
|
|
262
262
|
iceCandidate(input: IceCandidate, options?: RpcOptions): UnaryCall<IceCandidate, Empty>;
|
|
263
263
|
}
|
|
264
264
|
/**
|
|
265
|
-
* @generated from protobuf service dht.
|
|
265
|
+
* @generated from protobuf service dht.WebRtcConnectorRpc
|
|
266
266
|
*/
|
|
267
|
-
export class
|
|
268
|
-
typeName =
|
|
269
|
-
methods =
|
|
270
|
-
options =
|
|
267
|
+
export class WebRtcConnectorRpcClient implements IWebRtcConnectorRpcClient, ServiceInfo {
|
|
268
|
+
typeName = WebRtcConnectorRpc.typeName;
|
|
269
|
+
methods = WebRtcConnectorRpc.methods;
|
|
270
|
+
options = WebRtcConnectorRpc.options;
|
|
271
271
|
constructor(private readonly _transport: RpcTransport) {
|
|
272
272
|
}
|
|
273
273
|
/**
|
|
@@ -300,9 +300,9 @@ export class WebRtcConnectorServiceClient implements IWebRtcConnectorServiceClie
|
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
302
|
/**
|
|
303
|
-
* @generated from protobuf service dht.
|
|
303
|
+
* @generated from protobuf service dht.ConnectionLockRpc
|
|
304
304
|
*/
|
|
305
|
-
export interface
|
|
305
|
+
export interface IConnectionLockRpcClient {
|
|
306
306
|
/**
|
|
307
307
|
* @generated from protobuf rpc: lockRequest(dht.LockRequest) returns (dht.LockResponse);
|
|
308
308
|
*/
|
|
@@ -317,12 +317,12 @@ export interface IConnectionLockerClient {
|
|
|
317
317
|
gracefulDisconnect(input: DisconnectNotice, options?: RpcOptions): UnaryCall<DisconnectNotice, DisconnectNoticeResponse>;
|
|
318
318
|
}
|
|
319
319
|
/**
|
|
320
|
-
* @generated from protobuf service dht.
|
|
320
|
+
* @generated from protobuf service dht.ConnectionLockRpc
|
|
321
321
|
*/
|
|
322
|
-
export class
|
|
323
|
-
typeName =
|
|
324
|
-
methods =
|
|
325
|
-
options =
|
|
322
|
+
export class ConnectionLockRpcClient implements IConnectionLockRpcClient, ServiceInfo {
|
|
323
|
+
typeName = ConnectionLockRpc.typeName;
|
|
324
|
+
methods = ConnectionLockRpc.methods;
|
|
325
|
+
options = ConnectionLockRpc.options;
|
|
326
326
|
constructor(private readonly _transport: RpcTransport) {
|
|
327
327
|
}
|
|
328
328
|
/**
|
|
@@ -348,9 +348,9 @@ export class ConnectionLockerClient implements IConnectionLockerClient, ServiceI
|
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
350
|
/**
|
|
351
|
-
* @generated from protobuf service dht.
|
|
351
|
+
* @generated from protobuf service dht.ExternalApiRpc
|
|
352
352
|
*/
|
|
353
|
-
export interface
|
|
353
|
+
export interface IExternalApiRpcClient {
|
|
354
354
|
/**
|
|
355
355
|
* @generated from protobuf rpc: findData(dht.FindDataRequest) returns (dht.FindDataResponse);
|
|
356
356
|
*/
|
|
@@ -361,12 +361,12 @@ export interface IExternalApiServiceClient {
|
|
|
361
361
|
externalStoreData(input: ExternalStoreDataRequest, options?: RpcOptions): UnaryCall<ExternalStoreDataRequest, ExternalStoreDataResponse>;
|
|
362
362
|
}
|
|
363
363
|
/**
|
|
364
|
-
* @generated from protobuf service dht.
|
|
364
|
+
* @generated from protobuf service dht.ExternalApiRpc
|
|
365
365
|
*/
|
|
366
|
-
export class
|
|
367
|
-
typeName =
|
|
368
|
-
methods =
|
|
369
|
-
options =
|
|
366
|
+
export class ExternalApiRpcClient implements IExternalApiRpcClient, ServiceInfo {
|
|
367
|
+
typeName = ExternalApiRpc.typeName;
|
|
368
|
+
methods = ExternalApiRpc.methods;
|
|
369
|
+
options = ExternalApiRpc.options;
|
|
370
370
|
constructor(private readonly _transport: RpcTransport) {
|
|
371
371
|
}
|
|
372
372
|
/**
|
|
@@ -16,7 +16,7 @@ import { RtcOffer } from "./DhtRpc";
|
|
|
16
16
|
import { WebRtcConnectionRequest } from "./DhtRpc";
|
|
17
17
|
import { WebSocketConnectionResponse } from "./DhtRpc";
|
|
18
18
|
import { WebSocketConnectionRequest } from "./DhtRpc";
|
|
19
|
-
import {
|
|
19
|
+
import { FindResponse } from "./DhtRpc";
|
|
20
20
|
import { DeleteDataResponse } from "./DhtRpc";
|
|
21
21
|
import { DeleteDataRequest } from "./DhtRpc";
|
|
22
22
|
import { MigrateDataResponse } from "./DhtRpc";
|
|
@@ -50,9 +50,9 @@ export interface IDhtRpcService<T = ServerCallContext> {
|
|
|
50
50
|
leaveNotice(request: LeaveNotice, context: T): Promise<Empty>;
|
|
51
51
|
}
|
|
52
52
|
/**
|
|
53
|
-
* @generated from protobuf service dht.
|
|
53
|
+
* @generated from protobuf service dht.RouterRpc
|
|
54
54
|
*/
|
|
55
|
-
export interface
|
|
55
|
+
export interface IRouterRpc<T = ServerCallContext> {
|
|
56
56
|
/**
|
|
57
57
|
* @generated from protobuf rpc: routeMessage(dht.RouteMessageWrapper) returns (dht.RouteMessageAck);
|
|
58
58
|
*/
|
|
@@ -67,9 +67,9 @@ export interface IRoutingService<T = ServerCallContext> {
|
|
|
67
67
|
findRecursively(request: RouteMessageWrapper, context: T): Promise<RouteMessageAck>;
|
|
68
68
|
}
|
|
69
69
|
/**
|
|
70
|
-
* @generated from protobuf service dht.
|
|
70
|
+
* @generated from protobuf service dht.StoreRpc
|
|
71
71
|
*/
|
|
72
|
-
export interface
|
|
72
|
+
export interface IStoreRpc<T = ServerCallContext> {
|
|
73
73
|
/**
|
|
74
74
|
* @generated from protobuf rpc: storeData(dht.StoreDataRequest) returns (dht.StoreDataResponse);
|
|
75
75
|
*/
|
|
@@ -88,23 +88,23 @@ export interface IStoreService<T = ServerCallContext> {
|
|
|
88
88
|
*/
|
|
89
89
|
export interface IRecursiveFindSessionService<T = ServerCallContext> {
|
|
90
90
|
/**
|
|
91
|
-
* @generated from protobuf rpc:
|
|
91
|
+
* @generated from protobuf rpc: sendFindResponse(dht.FindResponse) returns (google.protobuf.Empty);
|
|
92
92
|
*/
|
|
93
|
-
|
|
93
|
+
sendFindResponse(request: FindResponse, context: T): Promise<Empty>;
|
|
94
94
|
}
|
|
95
95
|
/**
|
|
96
|
-
* @generated from protobuf service dht.
|
|
96
|
+
* @generated from protobuf service dht.WebSocketConnectorRpc
|
|
97
97
|
*/
|
|
98
|
-
export interface
|
|
98
|
+
export interface IWebSocketConnectorRpc<T = ServerCallContext> {
|
|
99
99
|
/**
|
|
100
100
|
* @generated from protobuf rpc: requestConnection(dht.WebSocketConnectionRequest) returns (dht.WebSocketConnectionResponse);
|
|
101
101
|
*/
|
|
102
102
|
requestConnection(request: WebSocketConnectionRequest, context: T): Promise<WebSocketConnectionResponse>;
|
|
103
103
|
}
|
|
104
104
|
/**
|
|
105
|
-
* @generated from protobuf service dht.
|
|
105
|
+
* @generated from protobuf service dht.WebRtcConnectorRpc
|
|
106
106
|
*/
|
|
107
|
-
export interface
|
|
107
|
+
export interface IWebRtcConnectorRpc<T = ServerCallContext> {
|
|
108
108
|
/**
|
|
109
109
|
* @generated from protobuf rpc: requestConnection(dht.WebRtcConnectionRequest) returns (google.protobuf.Empty);
|
|
110
110
|
*/
|
|
@@ -123,9 +123,9 @@ export interface IWebRtcConnectorService<T = ServerCallContext> {
|
|
|
123
123
|
iceCandidate(request: IceCandidate, context: T): Promise<Empty>;
|
|
124
124
|
}
|
|
125
125
|
/**
|
|
126
|
-
* @generated from protobuf service dht.
|
|
126
|
+
* @generated from protobuf service dht.ConnectionLockRpc
|
|
127
127
|
*/
|
|
128
|
-
export interface
|
|
128
|
+
export interface IConnectionLockRpc<T = ServerCallContext> {
|
|
129
129
|
/**
|
|
130
130
|
* @generated from protobuf rpc: lockRequest(dht.LockRequest) returns (dht.LockResponse);
|
|
131
131
|
*/
|
|
@@ -140,9 +140,9 @@ export interface IConnectionLocker<T = ServerCallContext> {
|
|
|
140
140
|
gracefulDisconnect(request: DisconnectNotice, context: T): Promise<DisconnectNoticeResponse>;
|
|
141
141
|
}
|
|
142
142
|
/**
|
|
143
|
-
* @generated from protobuf service dht.
|
|
143
|
+
* @generated from protobuf service dht.ExternalApiRpc
|
|
144
144
|
*/
|
|
145
|
-
export interface
|
|
145
|
+
export interface IExternalApiRpc<T = ServerCallContext> {
|
|
146
146
|
/**
|
|
147
147
|
* @generated from protobuf rpc: findData(dht.FindDataRequest) returns (dht.FindDataResponse);
|
|
148
148
|
*/
|