@fraym/proto 0.10.0 → 0.10.1
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.
|
@@ -183,7 +183,7 @@ exports.GlobalLock = {
|
|
|
183
183
|
},
|
|
184
184
|
};
|
|
185
185
|
function createBaseCreateLeaseRequest() {
|
|
186
|
-
return { ip: "", app: "", ttl: 0, alreadyRegisteredLocalLocks: [], alreadyRegisteredGlobalLocks: [] };
|
|
186
|
+
return { ip: "", app: "", ttl: 0, leaseId: "", alreadyRegisteredLocalLocks: [], alreadyRegisteredGlobalLocks: [] };
|
|
187
187
|
}
|
|
188
188
|
exports.CreateLeaseRequest = {
|
|
189
189
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
@@ -196,11 +196,14 @@ exports.CreateLeaseRequest = {
|
|
|
196
196
|
if (message.ttl !== 0) {
|
|
197
197
|
writer.uint32(24).int32(message.ttl);
|
|
198
198
|
}
|
|
199
|
+
if (message.leaseId !== "") {
|
|
200
|
+
writer.uint32(34).string(message.leaseId);
|
|
201
|
+
}
|
|
199
202
|
for (const v of message.alreadyRegisteredLocalLocks) {
|
|
200
|
-
exports.LocalLock.encode(v, writer.uint32(
|
|
203
|
+
exports.LocalLock.encode(v, writer.uint32(42).fork()).ldelim();
|
|
201
204
|
}
|
|
202
205
|
for (const v of message.alreadyRegisteredGlobalLocks) {
|
|
203
|
-
exports.GlobalLock.encode(v, writer.uint32(
|
|
206
|
+
exports.GlobalLock.encode(v, writer.uint32(50).fork()).ldelim();
|
|
204
207
|
}
|
|
205
208
|
return writer;
|
|
206
209
|
},
|
|
@@ -233,12 +236,18 @@ exports.CreateLeaseRequest = {
|
|
|
233
236
|
if (tag !== 34) {
|
|
234
237
|
break;
|
|
235
238
|
}
|
|
236
|
-
message.
|
|
239
|
+
message.leaseId = reader.string();
|
|
237
240
|
continue;
|
|
238
241
|
case 5:
|
|
239
242
|
if (tag !== 42) {
|
|
240
243
|
break;
|
|
241
244
|
}
|
|
245
|
+
message.alreadyRegisteredLocalLocks.push(exports.LocalLock.decode(reader, reader.uint32()));
|
|
246
|
+
continue;
|
|
247
|
+
case 6:
|
|
248
|
+
if (tag !== 50) {
|
|
249
|
+
break;
|
|
250
|
+
}
|
|
242
251
|
message.alreadyRegisteredGlobalLocks.push(exports.GlobalLock.decode(reader, reader.uint32()));
|
|
243
252
|
continue;
|
|
244
253
|
}
|
|
@@ -254,6 +263,7 @@ exports.CreateLeaseRequest = {
|
|
|
254
263
|
ip: isSet(object.ip) ? globalThis.String(object.ip) : "",
|
|
255
264
|
app: isSet(object.app) ? globalThis.String(object.app) : "",
|
|
256
265
|
ttl: isSet(object.ttl) ? globalThis.Number(object.ttl) : 0,
|
|
266
|
+
leaseId: isSet(object.leaseId) ? globalThis.String(object.leaseId) : "",
|
|
257
267
|
alreadyRegisteredLocalLocks: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.alreadyRegisteredLocalLocks)
|
|
258
268
|
? object.alreadyRegisteredLocalLocks.map((e) => exports.LocalLock.fromJSON(e))
|
|
259
269
|
: [],
|
|
@@ -274,6 +284,9 @@ exports.CreateLeaseRequest = {
|
|
|
274
284
|
if (message.ttl !== 0) {
|
|
275
285
|
obj.ttl = Math.round(message.ttl);
|
|
276
286
|
}
|
|
287
|
+
if (message.leaseId !== "") {
|
|
288
|
+
obj.leaseId = message.leaseId;
|
|
289
|
+
}
|
|
277
290
|
if ((_a = message.alreadyRegisteredLocalLocks) === null || _a === void 0 ? void 0 : _a.length) {
|
|
278
291
|
obj.alreadyRegisteredLocalLocks = message.alreadyRegisteredLocalLocks.map((e) => exports.LocalLock.toJSON(e));
|
|
279
292
|
}
|
|
@@ -286,14 +299,15 @@ exports.CreateLeaseRequest = {
|
|
|
286
299
|
return exports.CreateLeaseRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
287
300
|
},
|
|
288
301
|
fromPartial(object) {
|
|
289
|
-
var _a, _b, _c, _d, _e;
|
|
302
|
+
var _a, _b, _c, _d, _e, _f;
|
|
290
303
|
const message = createBaseCreateLeaseRequest();
|
|
291
304
|
message.ip = (_a = object.ip) !== null && _a !== void 0 ? _a : "";
|
|
292
305
|
message.app = (_b = object.app) !== null && _b !== void 0 ? _b : "";
|
|
293
306
|
message.ttl = (_c = object.ttl) !== null && _c !== void 0 ? _c : 0;
|
|
294
|
-
message.
|
|
307
|
+
message.leaseId = (_d = object.leaseId) !== null && _d !== void 0 ? _d : "";
|
|
308
|
+
message.alreadyRegisteredLocalLocks = ((_e = object.alreadyRegisteredLocalLocks) === null || _e === void 0 ? void 0 : _e.map((e) => exports.LocalLock.fromPartial(e))) ||
|
|
295
309
|
[];
|
|
296
|
-
message.alreadyRegisteredGlobalLocks = ((
|
|
310
|
+
message.alreadyRegisteredGlobalLocks = ((_f = object.alreadyRegisteredGlobalLocks) === null || _f === void 0 ? void 0 : _f.map((e) => exports.GlobalLock.fromPartial(e))) ||
|
|
297
311
|
[];
|
|
298
312
|
return message;
|
|
299
313
|
},
|