newBuilder()
+ .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(generateFullMethodName(
+ "pb.NodeAPI", "Persist"))
+ .setSampledToLocalTracing(true)
+ .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
+ pb.Node.PersistRequest.getDefaultInstance()))
+ .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
+ pb.Node.PersistResponse.getDefaultInstance()))
+ .setSchemaDescriptor(new NodeAPIMethodDescriptorSupplier("Persist"))
+ .build();
+ }
+ }
+ }
+ return getPersistMethod;
+ }
+
/**
* Creates a new async stub that supports all call types for the service
*/
@@ -314,6 +346,16 @@ public void keystore(pb.Node.KeystoreRequest request,
asyncUnimplementedUnaryCall(getKeystoreMethod(), responseObserver);
}
+ /**
+ *
+ * Persist is used to retrieve data from the network and make it available locally
+ *
+ */
+ public void persist(pb.Node.PersistRequest request,
+ io.grpc.stub.StreamObserver responseObserver) {
+ asyncUnimplementedUnaryCall(getPersistMethod(), responseObserver);
+ }
+
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
@@ -358,6 +400,13 @@ public void keystore(pb.Node.KeystoreRequest request,
pb.Node.KeystoreRequest,
pb.Node.KeystoreResponse>(
this, METHODID_KEYSTORE)))
+ .addMethod(
+ getPersistMethod(),
+ asyncUnaryCall(
+ new MethodHandlers<
+ pb.Node.PersistRequest,
+ pb.Node.PersistResponse>(
+ this, METHODID_PERSIST)))
.build();
}
}
@@ -450,6 +499,17 @@ public void keystore(pb.Node.KeystoreRequest request,
asyncUnaryCall(
getChannel().newCall(getKeystoreMethod(), getCallOptions()), request, responseObserver);
}
+
+ /**
+ *
+ * Persist is used to retrieve data from the network and make it available locally
+ *
+ */
+ public void persist(pb.Node.PersistRequest request,
+ io.grpc.stub.StreamObserver responseObserver) {
+ asyncUnaryCall(
+ getChannel().newCall(getPersistMethod(), getCallOptions()), request, responseObserver);
+ }
}
/**
@@ -534,6 +594,16 @@ public pb.Node.KeystoreResponse keystore(pb.Node.KeystoreRequest request) {
return blockingUnaryCall(
getChannel(), getKeystoreMethod(), getCallOptions(), request);
}
+
+ /**
+ *
+ * Persist is used to retrieve data from the network and make it available locally
+ *
+ */
+ public pb.Node.PersistResponse persist(pb.Node.PersistRequest request) {
+ return blockingUnaryCall(
+ getChannel(), getPersistMethod(), getCallOptions(), request);
+ }
}
/**
@@ -624,6 +694,17 @@ public com.google.common.util.concurrent.ListenableFuture
+ * Persist is used to retrieve data from the network and make it available locally
+ *
+ */
+ public com.google.common.util.concurrent.ListenableFuture persist(
+ pb.Node.PersistRequest request) {
+ return futureUnaryCall(
+ getChannel().newCall(getPersistMethod(), getCallOptions()), request);
+ }
}
private static final int METHODID_CONN_MGMT = 0;
@@ -632,6 +713,7 @@ public com.google.common.util.concurrent.ListenableFuture implements
io.grpc.stub.ServerCalls.UnaryMethod,
@@ -674,6 +756,10 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv
serviceImpl.keystore((pb.Node.KeystoreRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
+ case METHODID_PERSIST:
+ serviceImpl.persist((pb.Node.PersistRequest) request,
+ (io.grpc.stub.StreamObserver) responseObserver);
+ break;
default:
throw new AssertionError();
}
@@ -741,6 +827,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() {
.addMethod(getBlockstoreMethod())
.addMethod(getDagMethod())
.addMethod(getKeystoreMethod())
+ .addMethod(getPersistMethod())
.build();
}
}
diff --git a/js/node_grpc_pb.js b/js/node_grpc_pb.js
index 0bb2290..5c39b2c 100644
--- a/js/node_grpc_pb.js
+++ b/js/node_grpc_pb.js
@@ -137,6 +137,28 @@ function deserialize_pb_P2PResponse(buffer_arg) {
return node_pb.P2PResponse.deserializeBinary(new Uint8Array(buffer_arg));
}
+function serialize_pb_PersistRequest(arg) {
+ if (!(arg instanceof node_pb.PersistRequest)) {
+ throw new Error('Expected argument of type pb.PersistRequest');
+ }
+ return Buffer.from(arg.serializeBinary());
+}
+
+function deserialize_pb_PersistRequest(buffer_arg) {
+ return node_pb.PersistRequest.deserializeBinary(new Uint8Array(buffer_arg));
+}
+
+function serialize_pb_PersistResponse(arg) {
+ if (!(arg instanceof node_pb.PersistResponse)) {
+ throw new Error('Expected argument of type pb.PersistResponse');
+ }
+ return Buffer.from(arg.serializeBinary());
+}
+
+function deserialize_pb_PersistResponse(buffer_arg) {
+ return node_pb.PersistResponse.deserializeBinary(new Uint8Array(buffer_arg));
+}
+
// NodeAPI provide an API to control the underlying custom ipfs node
var NodeAPIService = exports.NodeAPIService = {
@@ -214,6 +236,18 @@ var NodeAPIService = exports.NodeAPIService = {
responseSerialize: serialize_pb_KeystoreResponse,
responseDeserialize: deserialize_pb_KeystoreResponse,
},
+ // Persist is used to retrieve data from the network and make it available locally
+ persist: {
+ path: '/pb.NodeAPI/Persist',
+ requestStream: false,
+ responseStream: false,
+ requestType: node_pb.PersistRequest,
+ responseType: node_pb.PersistResponse,
+ requestSerialize: serialize_pb_PersistRequest,
+ requestDeserialize: deserialize_pb_PersistRequest,
+ responseSerialize: serialize_pb_PersistResponse,
+ responseDeserialize: deserialize_pb_PersistResponse,
+ },
};
exports.NodeAPIClient = grpc.makeGenericClientConstructor(NodeAPIService);
diff --git a/js/node_pb.js b/js/node_pb.js
index b48e947..d38027b 100644
--- a/js/node_pb.js
+++ b/js/node_pb.js
@@ -39,6 +39,8 @@ goog.exportSymbol('proto.pb.P2PLsInfo', null, global);
goog.exportSymbol('proto.pb.P2PREQTYPE', null, global);
goog.exportSymbol('proto.pb.P2PRequest', null, global);
goog.exportSymbol('proto.pb.P2PResponse', null, global);
+goog.exportSymbol('proto.pb.PersistRequest', null, global);
+goog.exportSymbol('proto.pb.PersistResponse', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
@@ -396,6 +398,48 @@ if (goog.DEBUG && !COMPILED) {
*/
proto.pb.KeystoreResponse.displayName = 'proto.pb.KeystoreResponse';
}
+/**
+ * Generated by JsPbCodeGenerator.
+ * @param {Array=} opt_data Optional initial data array, typically from a
+ * server response, or constructed directly in Javascript. The array is used
+ * in place and becomes part of the constructed object. It is not cloned.
+ * If no data is provided, the constructed object will be empty, but still
+ * valid.
+ * @extends {jspb.Message}
+ * @constructor
+ */
+proto.pb.PersistRequest = function(opt_data) {
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.pb.PersistRequest.repeatedFields_, null);
+};
+goog.inherits(proto.pb.PersistRequest, jspb.Message);
+if (goog.DEBUG && !COMPILED) {
+ /**
+ * @public
+ * @override
+ */
+ proto.pb.PersistRequest.displayName = 'proto.pb.PersistRequest';
+}
+/**
+ * Generated by JsPbCodeGenerator.
+ * @param {Array=} opt_data Optional initial data array, typically from a
+ * server response, or constructed directly in Javascript. The array is used
+ * in place and becomes part of the constructed object. It is not cloned.
+ * If no data is provided, the constructed object will be empty, but still
+ * valid.
+ * @extends {jspb.Message}
+ * @constructor
+ */
+proto.pb.PersistResponse = function(opt_data) {
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
+};
+goog.inherits(proto.pb.PersistResponse, jspb.Message);
+if (goog.DEBUG && !COMPILED) {
+ /**
+ * @public
+ * @override
+ */
+ proto.pb.PersistResponse.displayName = 'proto.pb.PersistResponse';
+}
@@ -4532,6 +4576,328 @@ proto.pb.KeystoreResponse.prototype.setHas = function(value) {
};
+
+/**
+ * List of repeated fields within this message type.
+ * @private {!Array}
+ * @const
+ */
+proto.pb.PersistRequest.repeatedFields_ = [1];
+
+
+
+if (jspb.Message.GENERATE_TO_OBJECT) {
+/**
+ * Creates an object representation of this proto.
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
+ * Optional fields that are not set will be set to undefined.
+ * To access a reserved field use, foo.pb_, eg, foo.pb_default.
+ * For the list of reserved names please see:
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
+ * JSPB instance for transitional soy proto support:
+ * http://goto/soy-param-migration
+ * @return {!Object}
+ */
+proto.pb.PersistRequest.prototype.toObject = function(opt_includeInstance) {
+ return proto.pb.PersistRequest.toObject(opt_includeInstance, this);
+};
+
+
+/**
+ * Static version of the {@see toObject} method.
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
+ * the JSPB instance for transitional soy proto support:
+ * http://goto/soy-param-migration
+ * @param {!proto.pb.PersistRequest} msg The msg instance to transform.
+ * @return {!Object}
+ * @suppress {unusedLocalVariables} f is only used for nested messages
+ */
+proto.pb.PersistRequest.toObject = function(includeInstance, msg) {
+ var f, obj = {
+ cidsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f
+ };
+
+ if (includeInstance) {
+ obj.$jspbMessageInstance = msg;
+ }
+ return obj;
+};
+}
+
+
+/**
+ * Deserializes binary data (in protobuf wire format).
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
+ * @return {!proto.pb.PersistRequest}
+ */
+proto.pb.PersistRequest.deserializeBinary = function(bytes) {
+ var reader = new jspb.BinaryReader(bytes);
+ var msg = new proto.pb.PersistRequest;
+ return proto.pb.PersistRequest.deserializeBinaryFromReader(msg, reader);
+};
+
+
+/**
+ * Deserializes binary data (in protobuf wire format) from the
+ * given reader into the given message object.
+ * @param {!proto.pb.PersistRequest} msg The message object to deserialize into.
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
+ * @return {!proto.pb.PersistRequest}
+ */
+proto.pb.PersistRequest.deserializeBinaryFromReader = function(msg, reader) {
+ while (reader.nextField()) {
+ if (reader.isEndGroup()) {
+ break;
+ }
+ var field = reader.getFieldNumber();
+ switch (field) {
+ case 1:
+ var value = /** @type {string} */ (reader.readString());
+ msg.addCids(value);
+ break;
+ default:
+ reader.skipField();
+ break;
+ }
+ }
+ return msg;
+};
+
+
+/**
+ * Serializes the message to binary data (in protobuf wire format).
+ * @return {!Uint8Array}
+ */
+proto.pb.PersistRequest.prototype.serializeBinary = function() {
+ var writer = new jspb.BinaryWriter();
+ proto.pb.PersistRequest.serializeBinaryToWriter(this, writer);
+ return writer.getResultBuffer();
+};
+
+
+/**
+ * Serializes the given message to binary data (in protobuf wire
+ * format), writing to the given BinaryWriter.
+ * @param {!proto.pb.PersistRequest} message
+ * @param {!jspb.BinaryWriter} writer
+ * @suppress {unusedLocalVariables} f is only used for nested messages
+ */
+proto.pb.PersistRequest.serializeBinaryToWriter = function(message, writer) {
+ var f = undefined;
+ f = message.getCidsList();
+ if (f.length > 0) {
+ writer.writeRepeatedString(
+ 1,
+ f
+ );
+ }
+};
+
+
+/**
+ * repeated string cids = 1;
+ * @return {!Array}
+ */
+proto.pb.PersistRequest.prototype.getCidsList = function() {
+ return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1));
+};
+
+
+/**
+ * @param {!Array} value
+ * @return {!proto.pb.PersistRequest} returns this
+ */
+proto.pb.PersistRequest.prototype.setCidsList = function(value) {
+ return jspb.Message.setField(this, 1, value || []);
+};
+
+
+/**
+ * @param {string} value
+ * @param {number=} opt_index
+ * @return {!proto.pb.PersistRequest} returns this
+ */
+proto.pb.PersistRequest.prototype.addCids = function(value, opt_index) {
+ return jspb.Message.addToRepeatedField(this, 1, value, opt_index);
+};
+
+
+/**
+ * Clears the list making it empty but non-null.
+ * @return {!proto.pb.PersistRequest} returns this
+ */
+proto.pb.PersistRequest.prototype.clearCidsList = function() {
+ return this.setCidsList([]);
+};
+
+
+
+
+
+if (jspb.Message.GENERATE_TO_OBJECT) {
+/**
+ * Creates an object representation of this proto.
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
+ * Optional fields that are not set will be set to undefined.
+ * To access a reserved field use, foo.pb_, eg, foo.pb_default.
+ * For the list of reserved names please see:
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
+ * JSPB instance for transitional soy proto support:
+ * http://goto/soy-param-migration
+ * @return {!Object}
+ */
+proto.pb.PersistResponse.prototype.toObject = function(opt_includeInstance) {
+ return proto.pb.PersistResponse.toObject(opt_includeInstance, this);
+};
+
+
+/**
+ * Static version of the {@see toObject} method.
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
+ * the JSPB instance for transitional soy proto support:
+ * http://goto/soy-param-migration
+ * @param {!proto.pb.PersistResponse} msg The msg instance to transform.
+ * @return {!Object}
+ * @suppress {unusedLocalVariables} f is only used for nested messages
+ */
+proto.pb.PersistResponse.toObject = function(includeInstance, msg) {
+ var f, obj = {
+ statusMap: (f = msg.getStatusMap()) ? f.toObject(includeInstance, undefined) : [],
+ errorsMap: (f = msg.getErrorsMap()) ? f.toObject(includeInstance, undefined) : []
+ };
+
+ if (includeInstance) {
+ obj.$jspbMessageInstance = msg;
+ }
+ return obj;
+};
+}
+
+
+/**
+ * Deserializes binary data (in protobuf wire format).
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
+ * @return {!proto.pb.PersistResponse}
+ */
+proto.pb.PersistResponse.deserializeBinary = function(bytes) {
+ var reader = new jspb.BinaryReader(bytes);
+ var msg = new proto.pb.PersistResponse;
+ return proto.pb.PersistResponse.deserializeBinaryFromReader(msg, reader);
+};
+
+
+/**
+ * Deserializes binary data (in protobuf wire format) from the
+ * given reader into the given message object.
+ * @param {!proto.pb.PersistResponse} msg The message object to deserialize into.
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
+ * @return {!proto.pb.PersistResponse}
+ */
+proto.pb.PersistResponse.deserializeBinaryFromReader = function(msg, reader) {
+ while (reader.nextField()) {
+ if (reader.isEndGroup()) {
+ break;
+ }
+ var field = reader.getFieldNumber();
+ switch (field) {
+ case 1:
+ var value = msg.getStatusMap();
+ reader.readMessage(value, function(message, reader) {
+ jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readBool, null, "", false);
+ });
+ break;
+ case 2:
+ var value = msg.getErrorsMap();
+ reader.readMessage(value, function(message, reader) {
+ jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", "");
+ });
+ break;
+ default:
+ reader.skipField();
+ break;
+ }
+ }
+ return msg;
+};
+
+
+/**
+ * Serializes the message to binary data (in protobuf wire format).
+ * @return {!Uint8Array}
+ */
+proto.pb.PersistResponse.prototype.serializeBinary = function() {
+ var writer = new jspb.BinaryWriter();
+ proto.pb.PersistResponse.serializeBinaryToWriter(this, writer);
+ return writer.getResultBuffer();
+};
+
+
+/**
+ * Serializes the given message to binary data (in protobuf wire
+ * format), writing to the given BinaryWriter.
+ * @param {!proto.pb.PersistResponse} message
+ * @param {!jspb.BinaryWriter} writer
+ * @suppress {unusedLocalVariables} f is only used for nested messages
+ */
+proto.pb.PersistResponse.serializeBinaryToWriter = function(message, writer) {
+ var f = undefined;
+ f = message.getStatusMap(true);
+ if (f && f.getLength() > 0) {
+ f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeBool);
+ }
+ f = message.getErrorsMap(true);
+ if (f && f.getLength() > 0) {
+ f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
+ }
+};
+
+
+/**
+ * map status = 1;
+ * @param {boolean=} opt_noLazyCreate Do not create the map if
+ * empty, instead returning `undefined`
+ * @return {!jspb.Map}
+ */
+proto.pb.PersistResponse.prototype.getStatusMap = function(opt_noLazyCreate) {
+ return /** @type {!jspb.Map} */ (
+ jspb.Message.getMapField(this, 1, opt_noLazyCreate,
+ null));
+};
+
+
+/**
+ * Clears values from the map. The map will be non-null.
+ * @return {!proto.pb.PersistResponse} returns this
+ */
+proto.pb.PersistResponse.prototype.clearStatusMap = function() {
+ this.getStatusMap().clear();
+ return this;};
+
+
+/**
+ * map errors = 2;
+ * @param {boolean=} opt_noLazyCreate Do not create the map if
+ * empty, instead returning `undefined`
+ * @return {!jspb.Map}
+ */
+proto.pb.PersistResponse.prototype.getErrorsMap = function(opt_noLazyCreate) {
+ return /** @type {!jspb.Map} */ (
+ jspb.Message.getMapField(this, 2, opt_noLazyCreate,
+ null));
+};
+
+
+/**
+ * Clears values from the map. The map will be non-null.
+ * @return {!proto.pb.PersistResponse} returns this
+ */
+proto.pb.PersistResponse.prototype.clearErrorsMap = function() {
+ this.getErrorsMap().clear();
+ return this;};
+
+
/**
* @enum {number}
*/
diff --git a/pb/node.proto b/pb/node.proto
index 284a217..52f039d 100644
--- a/pb/node.proto
+++ b/pb/node.proto
@@ -18,6 +18,8 @@ service NodeAPI {
rpc Dag(DagRequest) returns (DagResponse) { };
//Keystore is a unidirectional RPC allowing management of ipfs keystores
rpc Keystore(KeystoreRequest) returns (KeystoreResponse) { };
+ // Persist is used to retrieve data from the network and make it available locally
+ rpc Persist(PersistRequest) returns (PersistResponse) { };
}
// P2PREQTYPE denotes the particular type of request being used in the p2p rpc
@@ -329,4 +331,16 @@ message KeystoreResponse {
// indicates if we have the key in our keystore
// sent by: KS_HAS
bool has = 4;
+}
+
+message PersistRequest {
+ // cids to persist locally
+ repeated string cids = 1;
+}
+
+message PersistResponse {
+ // key = cid, value = whether or not it was persisted
+ map status = 1;
+ // key = cid, value = error if not persisted
+ map errors = 2;
}
\ No newline at end of file
diff --git a/py/node_pb2.py b/py/node_pb2.py
index 1aa08d1..2b1474d 100644
--- a/py/node_pb2.py
+++ b/py/node_pb2.py
@@ -22,7 +22,7 @@
package='pb',
syntax='proto3',
serialized_options=None,
- serialized_pb=_b('\n\nnode.proto\x12\x02pb\x1a\nutil.proto\"\xde\x01\n\nP2PRequest\x12#\n\x0brequestType\x18\x01 \x01(\x0e\x32\x0e.pb.P2PREQTYPE\x12\x0b\n\x03\x61ll\x18\x02 \x01(\x08\x12\x0f\n\x07verbose\x18\x03 \x01(\x08\x12\x14\n\x0cprotocolName\x18\x04 \x01(\t\x12\x15\n\rlistenAddress\x18\x05 \x01(\t\x12\x15\n\rtargetAddress\x18\x06 \x01(\t\x12\x15\n\rremoteAddress\x18\x07 \x01(\t\x12\x1c\n\x14\x61llowCustomProtocols\x18\x08 \x01(\x08\x12\x14\n\x0creportPeerID\x18\t \x01(\x08\"z\n\x0bP2PResponse\x12#\n\x0brequestType\x18\x01 \x01(\x0e\x32\x0e.pb.P2PREQTYPE\x12\r\n\x05names\x18\x02 \x03(\t\x12\x13\n\x0b\x63onnsClosed\x18\x03 \x01(\x05\x12\"\n\x0bstreamInfos\x18\x04 \x03(\x0b\x32\r.pb.P2PLsInfo\"^\n\tP2PLsInfo\x12\x14\n\x0cprotocolName\x18\x01 \x01(\t\x12\x15\n\rlistenAddress\x18\x02 \x01(\t\x12\x15\n\rtargetAddress\x18\x03 \x01(\t\x12\r\n\x05local\x18\x04 \x01(\x08\"#\n\x10GetPeersResponse\x12\x0f\n\x07peerIDs\x18\x01 \x03(\t\"`\n\x0f\x43onnMgmtRequest\x12(\n\x0brequestType\x18\x01 \x01(\x0e\x32\x13.pb.CONNMGMTREQTYPE\x12\x12\n\nmultiAddrs\x18\x02 \x03(\t\x12\x0f\n\x07peerIDs\x18\x03 \x03(\t\"\xac\x02\n\x10\x43onnMgmtResponse\x12(\n\x0brequestType\x18\x01 \x01(\x0e\x32\x13.pb.CONNMGMTREQTYPE\x12\x36\n\tconnected\x18\x02 \x03(\x0b\x32#.pb.ConnMgmtResponse.ConnectedEntry\x12\x30\n\x06status\x18\x03 \x03(\x0b\x32 .pb.ConnMgmtResponse.StatusEntry\x12\x0f\n\x07peerIDs\x18\x04 \x03(\t\x1a\x30\n\x0e\x43onnectedEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x08:\x02\x38\x01\x1a\x41\n\x0bStatusEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.pb.ConnMgmtStatus:\x02\x38\x01\"6\n\x0e\x43onnMgmtStatus\x12\x14\n\x0c\x64isconnected\x18\x01 \x01(\x08\x12\x0e\n\x06reason\x18\x02 \x01(\t\"^\n\rExtrasRequest\x12&\n\x0brequestType\x18\x01 \x01(\x0e\x32\x11.pb.EXTRASREQTYPE\x12%\n\rextrasFeature\x18\x02 \x01(\x0e\x32\x0e.pb.EXTRASTYPE\"\x99\x01\n\x11\x42lockstoreRequest\x12\"\n\x0brequestType\x18\x01 \x01(\x0e\x32\r.pb.BSREQTYPE\x12\x1e\n\x07reqOpts\x18\x02 \x03(\x0e\x32\r.pb.BSREQOPTS\x12\x0c\n\x04\x63ids\x18\x03 \x03(\t\x12\x0c\n\x04\x64\x61ta\x18\x04 \x03(\x0c\x12\x12\n\ncidVersion\x18\x05 \x01(\t\x12\x10\n\x08hashFunc\x18\x07 \x01(\t\"S\n\x12\x42lockstoreResponse\x12\"\n\x0brequestType\x18\x01 \x01(\x0e\x32\r.pb.BSREQTYPE\x12\x19\n\x06\x62locks\x18\x02 \x03(\x0b\x32\t.pb.Block\"\"\n\x05\x42lock\x12\x0b\n\x03\x63id\x18\x01 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\"\x80\x02\n\nDagRequest\x12#\n\x0brequestType\x18\x01 \x01(\x0e\x32\x0e.pb.DAGREQTYPE\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\x12\x16\n\x0eobjectEncoding\x18\x03 \x01(\t\x12\x1b\n\x13serializationFormat\x18\x04 \x01(\t\x12\x10\n\x08hashFunc\x18\x05 \x01(\t\x12\x12\n\ncidVersion\x18\x06 \x01(\x03\x12\x0c\n\x04hash\x18\x07 \x01(\t\x12(\n\x05links\x18\x08 \x03(\x0b\x32\x19.pb.DagRequest.LinksEntry\x1a,\n\nLinksEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"p\n\x0b\x44\x61gResponse\x12#\n\x0brequestType\x18\x01 \x01(\x0e\x32\x0e.pb.DAGREQTYPE\x12\x0e\n\x06hashes\x18\x02 \x03(\t\x12\x0f\n\x07rawData\x18\x03 \x01(\x0c\x12\x1b\n\x05links\x18\x04 \x03(\x0b\x32\x0c.pb.IPLDLink\"4\n\x08IPLDLink\x12\x0c\n\x04hash\x18\x01 \x01(\x0c\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0c\n\x04size\x18\x03 \x01(\x04\"5\n\x08IPLDNode\x12\x1b\n\x05links\x18\x02 \x03(\x0b\x32\x0c.pb.IPLDLink\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\"W\n\x0fKeystoreRequest\x12\"\n\x0brequestType\x18\x01 \x01(\x0e\x32\r.pb.KSREQTYPE\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x12\n\nprivateKey\x18\x03 \x01(\x0c\"i\n\x10KeystoreResponse\x12\"\n\x0brequestType\x18\x01 \x01(\x0e\x32\r.pb.KSREQTYPE\x12\x12\n\nprivateKey\x18\x02 \x01(\x0c\x12\x10\n\x08keyNames\x18\x03 \x03(\t\x12\x0b\n\x03has\x18\x04 \x01(\x08*8\n\nP2PREQTYPE\x12\t\n\x05\x43LOSE\x10\x00\x12\x0b\n\x07\x46ORWARD\x10\x01\x12\n\n\x06LISTEN\x10\x02\x12\x06\n\x02LS\x10\x03*U\n\x0f\x43ONNMGMTREQTYPE\x12\x0e\n\nCM_CONNECT\x10\x00\x12\x11\n\rCM_DISCONNECT\x10\x01\x12\r\n\tCM_STATUS\x10\x02\x12\x10\n\x0c\x43M_GET_PEERS\x10\x03*.\n\rEXTRASREQTYPE\x12\r\n\tEX_ENABLE\x10\x00\x12\x0e\n\nEX_DISABLE\x10\x01*?\n\nEXTRASTYPE\x12\x0c\n\x08IDENTIFY\x10\x00\x12\n\n\x06PUBSUB\x10\x01\x12\r\n\tDISCOVERY\x10\x02\x12\x08\n\x04MDNS\x10\x03*T\n\tBSREQTYPE\x12\r\n\tBS_DELETE\x10\x00\x12\n\n\x06\x42S_PUT\x10\x01\x12\x0f\n\x0b\x42S_PUT_MANY\x10\x02\x12\n\n\x06\x42S_GET\x10\x03\x12\x0f\n\x0b\x42S_GET_MANY\x10\x04*&\n\tBSREQOPTS\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x00\x12\x0c\n\x08\x42S_FORCE\x10\x01*^\n\nDAGREQTYPE\x12\x0b\n\x07\x44\x41G_PUT\x10\x00\x12\x0b\n\x07\x44\x41G_GET\x10\x01\x12\x10\n\x0c\x44\x41G_NEW_NODE\x10\x02\x12\x11\n\rDAG_ADD_LINKS\x10\x03\x12\x11\n\rDAG_GET_LINKS\x10\x04*K\n\tKSREQTYPE\x12\n\n\x06KS_HAS\x10\x00\x12\n\n\x06KS_GET\x10\x01\x12\n\n\x06KS_PUT\x10\x02\x12\r\n\tKS_DELETE\x10\x03\x12\x0b\n\x07KS_LIST\x10\x04\x32\xb8\x02\n\x07NodeAPI\x12\x37\n\x08\x43onnMgmt\x12\x13.pb.ConnMgmtRequest\x1a\x14.pb.ConnMgmtResponse\"\x00\x12(\n\x06\x45xtras\x12\x11.pb.ExtrasRequest\x1a\t.pb.Empty\"\x00\x12(\n\x03P2P\x12\x0e.pb.P2PRequest\x1a\x0f.pb.P2PResponse\"\x00\x12=\n\nBlockstore\x12\x15.pb.BlockstoreRequest\x1a\x16.pb.BlockstoreResponse\"\x00\x12(\n\x03\x44\x61g\x12\x0e.pb.DagRequest\x1a\x0f.pb.DagResponse\"\x00\x12\x37\n\x08Keystore\x12\x13.pb.KeystoreRequest\x1a\x14.pb.KeystoreResponse\"\x00\x62\x06proto3')
+ serialized_pb=_b('\n\nnode.proto\x12\x02pb\x1a\nutil.proto\"\xde\x01\n\nP2PRequest\x12#\n\x0brequestType\x18\x01 \x01(\x0e\x32\x0e.pb.P2PREQTYPE\x12\x0b\n\x03\x61ll\x18\x02 \x01(\x08\x12\x0f\n\x07verbose\x18\x03 \x01(\x08\x12\x14\n\x0cprotocolName\x18\x04 \x01(\t\x12\x15\n\rlistenAddress\x18\x05 \x01(\t\x12\x15\n\rtargetAddress\x18\x06 \x01(\t\x12\x15\n\rremoteAddress\x18\x07 \x01(\t\x12\x1c\n\x14\x61llowCustomProtocols\x18\x08 \x01(\x08\x12\x14\n\x0creportPeerID\x18\t \x01(\x08\"z\n\x0bP2PResponse\x12#\n\x0brequestType\x18\x01 \x01(\x0e\x32\x0e.pb.P2PREQTYPE\x12\r\n\x05names\x18\x02 \x03(\t\x12\x13\n\x0b\x63onnsClosed\x18\x03 \x01(\x05\x12\"\n\x0bstreamInfos\x18\x04 \x03(\x0b\x32\r.pb.P2PLsInfo\"^\n\tP2PLsInfo\x12\x14\n\x0cprotocolName\x18\x01 \x01(\t\x12\x15\n\rlistenAddress\x18\x02 \x01(\t\x12\x15\n\rtargetAddress\x18\x03 \x01(\t\x12\r\n\x05local\x18\x04 \x01(\x08\"#\n\x10GetPeersResponse\x12\x0f\n\x07peerIDs\x18\x01 \x03(\t\"`\n\x0f\x43onnMgmtRequest\x12(\n\x0brequestType\x18\x01 \x01(\x0e\x32\x13.pb.CONNMGMTREQTYPE\x12\x12\n\nmultiAddrs\x18\x02 \x03(\t\x12\x0f\n\x07peerIDs\x18\x03 \x03(\t\"\xac\x02\n\x10\x43onnMgmtResponse\x12(\n\x0brequestType\x18\x01 \x01(\x0e\x32\x13.pb.CONNMGMTREQTYPE\x12\x36\n\tconnected\x18\x02 \x03(\x0b\x32#.pb.ConnMgmtResponse.ConnectedEntry\x12\x30\n\x06status\x18\x03 \x03(\x0b\x32 .pb.ConnMgmtResponse.StatusEntry\x12\x0f\n\x07peerIDs\x18\x04 \x03(\t\x1a\x30\n\x0e\x43onnectedEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x08:\x02\x38\x01\x1a\x41\n\x0bStatusEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.pb.ConnMgmtStatus:\x02\x38\x01\"6\n\x0e\x43onnMgmtStatus\x12\x14\n\x0c\x64isconnected\x18\x01 \x01(\x08\x12\x0e\n\x06reason\x18\x02 \x01(\t\"^\n\rExtrasRequest\x12&\n\x0brequestType\x18\x01 \x01(\x0e\x32\x11.pb.EXTRASREQTYPE\x12%\n\rextrasFeature\x18\x02 \x01(\x0e\x32\x0e.pb.EXTRASTYPE\"\x99\x01\n\x11\x42lockstoreRequest\x12\"\n\x0brequestType\x18\x01 \x01(\x0e\x32\r.pb.BSREQTYPE\x12\x1e\n\x07reqOpts\x18\x02 \x03(\x0e\x32\r.pb.BSREQOPTS\x12\x0c\n\x04\x63ids\x18\x03 \x03(\t\x12\x0c\n\x04\x64\x61ta\x18\x04 \x03(\x0c\x12\x12\n\ncidVersion\x18\x05 \x01(\t\x12\x10\n\x08hashFunc\x18\x07 \x01(\t\"S\n\x12\x42lockstoreResponse\x12\"\n\x0brequestType\x18\x01 \x01(\x0e\x32\r.pb.BSREQTYPE\x12\x19\n\x06\x62locks\x18\x02 \x03(\x0b\x32\t.pb.Block\"\"\n\x05\x42lock\x12\x0b\n\x03\x63id\x18\x01 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\"\x80\x02\n\nDagRequest\x12#\n\x0brequestType\x18\x01 \x01(\x0e\x32\x0e.pb.DAGREQTYPE\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\x12\x16\n\x0eobjectEncoding\x18\x03 \x01(\t\x12\x1b\n\x13serializationFormat\x18\x04 \x01(\t\x12\x10\n\x08hashFunc\x18\x05 \x01(\t\x12\x12\n\ncidVersion\x18\x06 \x01(\x03\x12\x0c\n\x04hash\x18\x07 \x01(\t\x12(\n\x05links\x18\x08 \x03(\x0b\x32\x19.pb.DagRequest.LinksEntry\x1a,\n\nLinksEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"p\n\x0b\x44\x61gResponse\x12#\n\x0brequestType\x18\x01 \x01(\x0e\x32\x0e.pb.DAGREQTYPE\x12\x0e\n\x06hashes\x18\x02 \x03(\t\x12\x0f\n\x07rawData\x18\x03 \x01(\x0c\x12\x1b\n\x05links\x18\x04 \x03(\x0b\x32\x0c.pb.IPLDLink\"4\n\x08IPLDLink\x12\x0c\n\x04hash\x18\x01 \x01(\x0c\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0c\n\x04size\x18\x03 \x01(\x04\"5\n\x08IPLDNode\x12\x1b\n\x05links\x18\x02 \x03(\x0b\x32\x0c.pb.IPLDLink\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\"W\n\x0fKeystoreRequest\x12\"\n\x0brequestType\x18\x01 \x01(\x0e\x32\r.pb.KSREQTYPE\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x12\n\nprivateKey\x18\x03 \x01(\x0c\"i\n\x10KeystoreResponse\x12\"\n\x0brequestType\x18\x01 \x01(\x0e\x32\r.pb.KSREQTYPE\x12\x12\n\nprivateKey\x18\x02 \x01(\x0c\x12\x10\n\x08keyNames\x18\x03 \x03(\t\x12\x0b\n\x03has\x18\x04 \x01(\x08\"\x1e\n\x0ePersistRequest\x12\x0c\n\x04\x63ids\x18\x01 \x03(\t\"\xd1\x01\n\x0fPersistResponse\x12/\n\x06status\x18\x01 \x03(\x0b\x32\x1f.pb.PersistResponse.StatusEntry\x12/\n\x06\x65rrors\x18\x02 \x03(\x0b\x32\x1f.pb.PersistResponse.ErrorsEntry\x1a-\n\x0bStatusEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x08:\x02\x38\x01\x1a-\n\x0b\x45rrorsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01*8\n\nP2PREQTYPE\x12\t\n\x05\x43LOSE\x10\x00\x12\x0b\n\x07\x46ORWARD\x10\x01\x12\n\n\x06LISTEN\x10\x02\x12\x06\n\x02LS\x10\x03*U\n\x0f\x43ONNMGMTREQTYPE\x12\x0e\n\nCM_CONNECT\x10\x00\x12\x11\n\rCM_DISCONNECT\x10\x01\x12\r\n\tCM_STATUS\x10\x02\x12\x10\n\x0c\x43M_GET_PEERS\x10\x03*.\n\rEXTRASREQTYPE\x12\r\n\tEX_ENABLE\x10\x00\x12\x0e\n\nEX_DISABLE\x10\x01*?\n\nEXTRASTYPE\x12\x0c\n\x08IDENTIFY\x10\x00\x12\n\n\x06PUBSUB\x10\x01\x12\r\n\tDISCOVERY\x10\x02\x12\x08\n\x04MDNS\x10\x03*T\n\tBSREQTYPE\x12\r\n\tBS_DELETE\x10\x00\x12\n\n\x06\x42S_PUT\x10\x01\x12\x0f\n\x0b\x42S_PUT_MANY\x10\x02\x12\n\n\x06\x42S_GET\x10\x03\x12\x0f\n\x0b\x42S_GET_MANY\x10\x04*&\n\tBSREQOPTS\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x00\x12\x0c\n\x08\x42S_FORCE\x10\x01*^\n\nDAGREQTYPE\x12\x0b\n\x07\x44\x41G_PUT\x10\x00\x12\x0b\n\x07\x44\x41G_GET\x10\x01\x12\x10\n\x0c\x44\x41G_NEW_NODE\x10\x02\x12\x11\n\rDAG_ADD_LINKS\x10\x03\x12\x11\n\rDAG_GET_LINKS\x10\x04*K\n\tKSREQTYPE\x12\n\n\x06KS_HAS\x10\x00\x12\n\n\x06KS_GET\x10\x01\x12\n\n\x06KS_PUT\x10\x02\x12\r\n\tKS_DELETE\x10\x03\x12\x0b\n\x07KS_LIST\x10\x04\x32\xee\x02\n\x07NodeAPI\x12\x37\n\x08\x43onnMgmt\x12\x13.pb.ConnMgmtRequest\x1a\x14.pb.ConnMgmtResponse\"\x00\x12(\n\x06\x45xtras\x12\x11.pb.ExtrasRequest\x1a\t.pb.Empty\"\x00\x12(\n\x03P2P\x12\x0e.pb.P2PRequest\x1a\x0f.pb.P2PResponse\"\x00\x12=\n\nBlockstore\x12\x15.pb.BlockstoreRequest\x1a\x16.pb.BlockstoreResponse\"\x00\x12(\n\x03\x44\x61g\x12\x0e.pb.DagRequest\x1a\x0f.pb.DagResponse\"\x00\x12\x37\n\x08Keystore\x12\x13.pb.KeystoreRequest\x1a\x14.pb.KeystoreResponse\"\x00\x12\x34\n\x07Persist\x12\x12.pb.PersistRequest\x1a\x13.pb.PersistResponse\"\x00\x62\x06proto3')
,
dependencies=[util__pb2.DESCRIPTOR,])
@@ -51,8 +51,8 @@
],
containing_type=None,
serialized_options=None,
- serialized_start=2020,
- serialized_end=2076,
+ serialized_start=2264,
+ serialized_end=2320,
)
_sym_db.RegisterEnumDescriptor(_P2PREQTYPE)
@@ -82,8 +82,8 @@
],
containing_type=None,
serialized_options=None,
- serialized_start=2078,
- serialized_end=2163,
+ serialized_start=2322,
+ serialized_end=2407,
)
_sym_db.RegisterEnumDescriptor(_CONNMGMTREQTYPE)
@@ -105,8 +105,8 @@
],
containing_type=None,
serialized_options=None,
- serialized_start=2165,
- serialized_end=2211,
+ serialized_start=2409,
+ serialized_end=2455,
)
_sym_db.RegisterEnumDescriptor(_EXTRASREQTYPE)
@@ -136,8 +136,8 @@
],
containing_type=None,
serialized_options=None,
- serialized_start=2213,
- serialized_end=2276,
+ serialized_start=2457,
+ serialized_end=2520,
)
_sym_db.RegisterEnumDescriptor(_EXTRASTYPE)
@@ -171,8 +171,8 @@
],
containing_type=None,
serialized_options=None,
- serialized_start=2278,
- serialized_end=2362,
+ serialized_start=2522,
+ serialized_end=2606,
)
_sym_db.RegisterEnumDescriptor(_BSREQTYPE)
@@ -194,8 +194,8 @@
],
containing_type=None,
serialized_options=None,
- serialized_start=2364,
- serialized_end=2402,
+ serialized_start=2608,
+ serialized_end=2646,
)
_sym_db.RegisterEnumDescriptor(_BSREQOPTS)
@@ -229,8 +229,8 @@
],
containing_type=None,
serialized_options=None,
- serialized_start=2404,
- serialized_end=2498,
+ serialized_start=2648,
+ serialized_end=2742,
)
_sym_db.RegisterEnumDescriptor(_DAGREQTYPE)
@@ -264,8 +264,8 @@
],
containing_type=None,
serialized_options=None,
- serialized_start=2500,
- serialized_end=2575,
+ serialized_start=2744,
+ serialized_end=2819,
)
_sym_db.RegisterEnumDescriptor(_KSREQTYPE)
@@ -1263,6 +1263,149 @@
serialized_end=2018,
)
+
+_PERSISTREQUEST = _descriptor.Descriptor(
+ name='PersistRequest',
+ full_name='pb.PersistRequest',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ fields=[
+ _descriptor.FieldDescriptor(
+ name='cids', full_name='pb.PersistRequest.cids', index=0,
+ number=1, type=9, cpp_type=9, label=3,
+ has_default_value=False, default_value=[],
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR),
+ ],
+ extensions=[
+ ],
+ nested_types=[],
+ enum_types=[
+ ],
+ serialized_options=None,
+ is_extendable=False,
+ syntax='proto3',
+ extension_ranges=[],
+ oneofs=[
+ ],
+ serialized_start=2020,
+ serialized_end=2050,
+)
+
+
+_PERSISTRESPONSE_STATUSENTRY = _descriptor.Descriptor(
+ name='StatusEntry',
+ full_name='pb.PersistResponse.StatusEntry',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ fields=[
+ _descriptor.FieldDescriptor(
+ name='key', full_name='pb.PersistResponse.StatusEntry.key', index=0,
+ number=1, type=9, cpp_type=9, label=1,
+ has_default_value=False, default_value=_b("").decode('utf-8'),
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR),
+ _descriptor.FieldDescriptor(
+ name='value', full_name='pb.PersistResponse.StatusEntry.value', index=1,
+ number=2, type=8, cpp_type=7, label=1,
+ has_default_value=False, default_value=False,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR),
+ ],
+ extensions=[
+ ],
+ nested_types=[],
+ enum_types=[
+ ],
+ serialized_options=_b('8\001'),
+ is_extendable=False,
+ syntax='proto3',
+ extension_ranges=[],
+ oneofs=[
+ ],
+ serialized_start=2170,
+ serialized_end=2215,
+)
+
+_PERSISTRESPONSE_ERRORSENTRY = _descriptor.Descriptor(
+ name='ErrorsEntry',
+ full_name='pb.PersistResponse.ErrorsEntry',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ fields=[
+ _descriptor.FieldDescriptor(
+ name='key', full_name='pb.PersistResponse.ErrorsEntry.key', index=0,
+ number=1, type=9, cpp_type=9, label=1,
+ has_default_value=False, default_value=_b("").decode('utf-8'),
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR),
+ _descriptor.FieldDescriptor(
+ name='value', full_name='pb.PersistResponse.ErrorsEntry.value', index=1,
+ number=2, type=9, cpp_type=9, label=1,
+ has_default_value=False, default_value=_b("").decode('utf-8'),
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR),
+ ],
+ extensions=[
+ ],
+ nested_types=[],
+ enum_types=[
+ ],
+ serialized_options=_b('8\001'),
+ is_extendable=False,
+ syntax='proto3',
+ extension_ranges=[],
+ oneofs=[
+ ],
+ serialized_start=2217,
+ serialized_end=2262,
+)
+
+_PERSISTRESPONSE = _descriptor.Descriptor(
+ name='PersistResponse',
+ full_name='pb.PersistResponse',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ fields=[
+ _descriptor.FieldDescriptor(
+ name='status', full_name='pb.PersistResponse.status', index=0,
+ number=1, type=11, cpp_type=10, label=3,
+ has_default_value=False, default_value=[],
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR),
+ _descriptor.FieldDescriptor(
+ name='errors', full_name='pb.PersistResponse.errors', index=1,
+ number=2, type=11, cpp_type=10, label=3,
+ has_default_value=False, default_value=[],
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR),
+ ],
+ extensions=[
+ ],
+ nested_types=[_PERSISTRESPONSE_STATUSENTRY, _PERSISTRESPONSE_ERRORSENTRY, ],
+ enum_types=[
+ ],
+ serialized_options=None,
+ is_extendable=False,
+ syntax='proto3',
+ extension_ranges=[],
+ oneofs=[
+ ],
+ serialized_start=2053,
+ serialized_end=2262,
+)
+
_P2PREQUEST.fields_by_name['requestType'].enum_type = _P2PREQTYPE
_P2PRESPONSE.fields_by_name['requestType'].enum_type = _P2PREQTYPE
_P2PRESPONSE.fields_by_name['streamInfos'].message_type = _P2PLSINFO
@@ -1287,6 +1430,10 @@
_IPLDNODE.fields_by_name['links'].message_type = _IPLDLINK
_KEYSTOREREQUEST.fields_by_name['requestType'].enum_type = _KSREQTYPE
_KEYSTORERESPONSE.fields_by_name['requestType'].enum_type = _KSREQTYPE
+_PERSISTRESPONSE_STATUSENTRY.containing_type = _PERSISTRESPONSE
+_PERSISTRESPONSE_ERRORSENTRY.containing_type = _PERSISTRESPONSE
+_PERSISTRESPONSE.fields_by_name['status'].message_type = _PERSISTRESPONSE_STATUSENTRY
+_PERSISTRESPONSE.fields_by_name['errors'].message_type = _PERSISTRESPONSE_ERRORSENTRY
DESCRIPTOR.message_types_by_name['P2PRequest'] = _P2PREQUEST
DESCRIPTOR.message_types_by_name['P2PResponse'] = _P2PRESPONSE
DESCRIPTOR.message_types_by_name['P2PLsInfo'] = _P2PLSINFO
@@ -1304,6 +1451,8 @@
DESCRIPTOR.message_types_by_name['IPLDNode'] = _IPLDNODE
DESCRIPTOR.message_types_by_name['KeystoreRequest'] = _KEYSTOREREQUEST
DESCRIPTOR.message_types_by_name['KeystoreResponse'] = _KEYSTORERESPONSE
+DESCRIPTOR.message_types_by_name['PersistRequest'] = _PERSISTREQUEST
+DESCRIPTOR.message_types_by_name['PersistResponse'] = _PERSISTRESPONSE
DESCRIPTOR.enum_types_by_name['P2PREQTYPE'] = _P2PREQTYPE
DESCRIPTOR.enum_types_by_name['CONNMGMTREQTYPE'] = _CONNMGMTREQTYPE
DESCRIPTOR.enum_types_by_name['EXTRASREQTYPE'] = _EXTRASREQTYPE
@@ -1457,10 +1606,42 @@
})
_sym_db.RegisterMessage(KeystoreResponse)
+PersistRequest = _reflection.GeneratedProtocolMessageType('PersistRequest', (_message.Message,), {
+ 'DESCRIPTOR' : _PERSISTREQUEST,
+ '__module__' : 'node_pb2'
+ # @@protoc_insertion_point(class_scope:pb.PersistRequest)
+ })
+_sym_db.RegisterMessage(PersistRequest)
+
+PersistResponse = _reflection.GeneratedProtocolMessageType('PersistResponse', (_message.Message,), {
+
+ 'StatusEntry' : _reflection.GeneratedProtocolMessageType('StatusEntry', (_message.Message,), {
+ 'DESCRIPTOR' : _PERSISTRESPONSE_STATUSENTRY,
+ '__module__' : 'node_pb2'
+ # @@protoc_insertion_point(class_scope:pb.PersistResponse.StatusEntry)
+ })
+ ,
+
+ 'ErrorsEntry' : _reflection.GeneratedProtocolMessageType('ErrorsEntry', (_message.Message,), {
+ 'DESCRIPTOR' : _PERSISTRESPONSE_ERRORSENTRY,
+ '__module__' : 'node_pb2'
+ # @@protoc_insertion_point(class_scope:pb.PersistResponse.ErrorsEntry)
+ })
+ ,
+ 'DESCRIPTOR' : _PERSISTRESPONSE,
+ '__module__' : 'node_pb2'
+ # @@protoc_insertion_point(class_scope:pb.PersistResponse)
+ })
+_sym_db.RegisterMessage(PersistResponse)
+_sym_db.RegisterMessage(PersistResponse.StatusEntry)
+_sym_db.RegisterMessage(PersistResponse.ErrorsEntry)
+
_CONNMGMTRESPONSE_CONNECTEDENTRY._options = None
_CONNMGMTRESPONSE_STATUSENTRY._options = None
_DAGREQUEST_LINKSENTRY._options = None
+_PERSISTRESPONSE_STATUSENTRY._options = None
+_PERSISTRESPONSE_ERRORSENTRY._options = None
_NODEAPI = _descriptor.ServiceDescriptor(
name='NodeAPI',
@@ -1468,8 +1649,8 @@
file=DESCRIPTOR,
index=0,
serialized_options=None,
- serialized_start=2578,
- serialized_end=2890,
+ serialized_start=2822,
+ serialized_end=3188,
methods=[
_descriptor.MethodDescriptor(
name='ConnMgmt',
@@ -1525,6 +1706,15 @@
output_type=_KEYSTORERESPONSE,
serialized_options=None,
),
+ _descriptor.MethodDescriptor(
+ name='Persist',
+ full_name='pb.NodeAPI.Persist',
+ index=6,
+ containing_service=None,
+ input_type=_PERSISTREQUEST,
+ output_type=_PERSISTRESPONSE,
+ serialized_options=None,
+ ),
])
_sym_db.RegisterServiceDescriptor(_NODEAPI)
diff --git a/py/node_pb2_grpc.py b/py/node_pb2_grpc.py
index b6d5824..ec325e7 100644
--- a/py/node_pb2_grpc.py
+++ b/py/node_pb2_grpc.py
@@ -45,6 +45,11 @@ def __init__(self, channel):
request_serializer=node__pb2.KeystoreRequest.SerializeToString,
response_deserializer=node__pb2.KeystoreResponse.FromString,
)
+ self.Persist = channel.unary_unary(
+ '/pb.NodeAPI/Persist',
+ request_serializer=node__pb2.PersistRequest.SerializeToString,
+ response_deserializer=node__pb2.PersistResponse.FromString,
+ )
class NodeAPIServicer(object):
@@ -95,6 +100,13 @@ def Keystore(self, request, context):
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
+ def Persist(self, request, context):
+ """Persist is used to retrieve data from the network and make it available locally
+ """
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
+ context.set_details('Method not implemented!')
+ raise NotImplementedError('Method not implemented!')
+
def add_NodeAPIServicer_to_server(servicer, server):
rpc_method_handlers = {
@@ -128,6 +140,11 @@ def add_NodeAPIServicer_to_server(servicer, server):
request_deserializer=node__pb2.KeystoreRequest.FromString,
response_serializer=node__pb2.KeystoreResponse.SerializeToString,
),
+ 'Persist': grpc.unary_unary_rpc_method_handler(
+ servicer.Persist,
+ request_deserializer=node__pb2.PersistRequest.FromString,
+ response_serializer=node__pb2.PersistResponse.SerializeToString,
+ ),
}
generic_handler = grpc.method_handlers_generic_handler(
'pb.NodeAPI', rpc_method_handlers)
diff --git a/ts/node_pb.d.ts b/ts/node_pb.d.ts
index 1631fab..e3639ff 100644
--- a/ts/node_pb.d.ts
+++ b/ts/node_pb.d.ts
@@ -569,6 +569,50 @@ export namespace KeystoreResponse {
}
}
+export class PersistRequest extends jspb.Message {
+ clearCidsList(): void;
+ getCidsList(): Array;
+ setCidsList(value: Array): void;
+ addCids(value: string, index?: number): string;
+
+ serializeBinary(): Uint8Array;
+ toObject(includeInstance?: boolean): PersistRequest.AsObject;
+ static toObject(includeInstance: boolean, msg: PersistRequest): PersistRequest.AsObject;
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo};
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo};
+ static serializeBinaryToWriter(message: PersistRequest, writer: jspb.BinaryWriter): void;
+ static deserializeBinary(bytes: Uint8Array): PersistRequest;
+ static deserializeBinaryFromReader(message: PersistRequest, reader: jspb.BinaryReader): PersistRequest;
+}
+
+export namespace PersistRequest {
+ export type AsObject = {
+ cidsList: Array,
+ }
+}
+
+export class PersistResponse extends jspb.Message {
+ getStatusMap(): jspb.Map;
+ clearStatusMap(): void;
+ getErrorsMap(): jspb.Map;
+ clearErrorsMap(): void;
+ serializeBinary(): Uint8Array;
+ toObject(includeInstance?: boolean): PersistResponse.AsObject;
+ static toObject(includeInstance: boolean, msg: PersistResponse): PersistResponse.AsObject;
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo};
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo};
+ static serializeBinaryToWriter(message: PersistResponse, writer: jspb.BinaryWriter): void;
+ static deserializeBinary(bytes: Uint8Array): PersistResponse;
+ static deserializeBinaryFromReader(message: PersistResponse, reader: jspb.BinaryReader): PersistResponse;
+}
+
+export namespace PersistResponse {
+ export type AsObject = {
+ statusMap: Array<[string, boolean]>,
+ errorsMap: Array<[string, string]>,
+ }
+}
+
export interface P2PREQTYPEMap {
CLOSE: 0;
FORWARD: 1;
diff --git a/ts/node_pb_service.d.ts b/ts/node_pb_service.d.ts
index 565bae7..a909fb1 100644
--- a/ts/node_pb_service.d.ts
+++ b/ts/node_pb_service.d.ts
@@ -59,6 +59,15 @@ type NodeAPIKeystore = {
readonly responseType: typeof node_pb.KeystoreResponse;
};
+type NodeAPIPersist = {
+ readonly methodName: string;
+ readonly service: typeof NodeAPI;
+ readonly requestStream: false;
+ readonly responseStream: false;
+ readonly requestType: typeof node_pb.PersistRequest;
+ readonly responseType: typeof node_pb.PersistResponse;
+};
+
export class NodeAPI {
static readonly serviceName: string;
static readonly ConnMgmt: NodeAPIConnMgmt;
@@ -67,6 +76,7 @@ export class NodeAPI {
static readonly Blockstore: NodeAPIBlockstore;
static readonly Dag: NodeAPIDag;
static readonly Keystore: NodeAPIKeystore;
+ static readonly Persist: NodeAPIPersist;
}
export type ServiceError = { message: string, code: number; metadata: grpc.Metadata }
@@ -155,5 +165,14 @@ export class NodeAPIClient {
requestMessage: node_pb.KeystoreRequest,
callback: (error: ServiceError|null, responseMessage: node_pb.KeystoreResponse|null) => void
): UnaryResponse;
+ persist(
+ requestMessage: node_pb.PersistRequest,
+ metadata: grpc.Metadata,
+ callback: (error: ServiceError|null, responseMessage: node_pb.PersistResponse|null) => void
+ ): UnaryResponse;
+ persist(
+ requestMessage: node_pb.PersistRequest,
+ callback: (error: ServiceError|null, responseMessage: node_pb.PersistResponse|null) => void
+ ): UnaryResponse;
}
diff --git a/ts/node_pb_service.js b/ts/node_pb_service.js
index 4272c90..0e03df1 100644
--- a/ts/node_pb_service.js
+++ b/ts/node_pb_service.js
@@ -65,6 +65,15 @@ NodeAPI.Keystore = {
responseType: node_pb.KeystoreResponse
};
+NodeAPI.Persist = {
+ methodName: "Persist",
+ service: NodeAPI,
+ requestStream: false,
+ responseStream: false,
+ requestType: node_pb.PersistRequest,
+ responseType: node_pb.PersistResponse
+};
+
exports.NodeAPI = NodeAPI;
function NodeAPIClient(serviceHost, options) {
@@ -258,5 +267,36 @@ NodeAPIClient.prototype.keystore = function keystore(requestMessage, metadata, c
};
};
+NodeAPIClient.prototype.persist = function persist(requestMessage, metadata, callback) {
+ if (arguments.length === 2) {
+ callback = arguments[1];
+ }
+ var client = grpc.unary(NodeAPI.Persist, {
+ request: requestMessage,
+ host: this.serviceHost,
+ metadata: metadata,
+ transport: this.options.transport,
+ debug: this.options.debug,
+ onEnd: function (response) {
+ if (callback) {
+ if (response.status !== grpc.Code.OK) {
+ var err = new Error(response.statusMessage);
+ err.code = response.status;
+ err.metadata = response.trailers;
+ callback(err, null);
+ } else {
+ callback(null, response.message);
+ }
+ }
+ }
+ });
+ return {
+ cancel: function () {
+ callback = null;
+ client.close();
+ }
+ };
+};
+
exports.NodeAPIClient = NodeAPIClient;