Add active evals (#25)
* Add active evals * Convert type of stats to date or string * Fix generic overloads for run * Lower evaluate timeout * Add comment for createWriteStream
This commit is contained in:
@@ -10,6 +10,7 @@ var goog = jspb;
|
||||
var global = Function('return this')();
|
||||
|
||||
goog.exportSymbol('proto.EvalDoneMessage', null, global);
|
||||
goog.exportSymbol('proto.EvalEventMessage', null, global);
|
||||
goog.exportSymbol('proto.EvalFailedMessage', null, global);
|
||||
goog.exportSymbol('proto.EvalFailedMessage.Reason', null, global);
|
||||
goog.exportSymbol('proto.NewEvalMessage', null, global);
|
||||
@@ -267,7 +268,8 @@ proto.NewEvalMessage.toObject = function(includeInstance, msg) {
|
||||
id: msg.getId(),
|
||||
pb_function: msg.getFunction(),
|
||||
argsList: jspb.Message.getField(msg, 3),
|
||||
timeout: msg.getTimeout()
|
||||
timeout: msg.getTimeout(),
|
||||
active: msg.getActive()
|
||||
};
|
||||
|
||||
if (includeInstance) {
|
||||
@@ -321,6 +323,10 @@ proto.NewEvalMessage.deserializeBinaryFromReader = function(msg, reader) {
|
||||
var value = /** @type {number} */ (reader.readUint32());
|
||||
msg.setTimeout(value);
|
||||
break;
|
||||
case 5:
|
||||
var value = /** @type {boolean} */ (reader.readBool());
|
||||
msg.setActive(value);
|
||||
break;
|
||||
default:
|
||||
reader.skipField();
|
||||
break;
|
||||
@@ -387,6 +393,13 @@ proto.NewEvalMessage.prototype.serializeBinaryToWriter = function (writer) {
|
||||
f
|
||||
);
|
||||
}
|
||||
f = this.getActive();
|
||||
if (f) {
|
||||
writer.writeBool(
|
||||
5,
|
||||
f
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -466,6 +479,251 @@ proto.NewEvalMessage.prototype.setTimeout = function(value) {
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional bool active = 5;
|
||||
* Note that Boolean fields may be set to 0/1 when serialized from a Java server.
|
||||
* You should avoid comparisons like {@code val === true/false} in those cases.
|
||||
* @return {boolean}
|
||||
*/
|
||||
proto.NewEvalMessage.prototype.getActive = function() {
|
||||
return /** @type {boolean} */ (jspb.Message.getFieldProto3(this, 5, false));
|
||||
};
|
||||
|
||||
|
||||
/** @param {boolean} value */
|
||||
proto.NewEvalMessage.prototype.setActive = function(value) {
|
||||
jspb.Message.setField(this, 5, value);
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 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.EvalEventMessage = function(opt_data) {
|
||||
jspb.Message.initialize(this, opt_data, 0, -1, proto.EvalEventMessage.repeatedFields_, null);
|
||||
};
|
||||
goog.inherits(proto.EvalEventMessage, jspb.Message);
|
||||
if (goog.DEBUG && !COMPILED) {
|
||||
proto.EvalEventMessage.displayName = 'proto.EvalEventMessage';
|
||||
}
|
||||
/**
|
||||
* List of repeated fields within this message type.
|
||||
* @private {!Array<number>}
|
||||
* @const
|
||||
*/
|
||||
proto.EvalEventMessage.repeatedFields_ = [3];
|
||||
|
||||
|
||||
|
||||
if (jspb.Message.GENERATE_TO_OBJECT) {
|
||||
/**
|
||||
* Creates an object representation of this proto suitable for use in Soy templates.
|
||||
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
||||
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
||||
* For the list of reserved names please see:
|
||||
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
|
||||
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
|
||||
* for transitional soy proto support: http://goto/soy-param-migration
|
||||
* @return {!Object}
|
||||
*/
|
||||
proto.EvalEventMessage.prototype.toObject = function(opt_includeInstance) {
|
||||
return proto.EvalEventMessage.toObject(opt_includeInstance, this);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Static version of the {@see toObject} method.
|
||||
* @param {boolean|undefined} includeInstance Whether to include the JSPB
|
||||
* instance for transitional soy proto support:
|
||||
* http://goto/soy-param-migration
|
||||
* @param {!proto.EvalEventMessage} msg The msg instance to transform.
|
||||
* @return {!Object}
|
||||
*/
|
||||
proto.EvalEventMessage.toObject = function(includeInstance, msg) {
|
||||
var f, obj = {
|
||||
id: msg.getId(),
|
||||
event: msg.getEvent(),
|
||||
argsList: jspb.Message.getField(msg, 3)
|
||||
};
|
||||
|
||||
if (includeInstance) {
|
||||
obj.$jspbMessageInstance = msg;
|
||||
}
|
||||
return obj;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Deserializes binary data (in protobuf wire format).
|
||||
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
||||
* @return {!proto.EvalEventMessage}
|
||||
*/
|
||||
proto.EvalEventMessage.deserializeBinary = function(bytes) {
|
||||
var reader = new jspb.BinaryReader(bytes);
|
||||
var msg = new proto.EvalEventMessage;
|
||||
return proto.EvalEventMessage.deserializeBinaryFromReader(msg, reader);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Deserializes binary data (in protobuf wire format) from the
|
||||
* given reader into the given message object.
|
||||
* @param {!proto.EvalEventMessage} msg The message object to deserialize into.
|
||||
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
||||
* @return {!proto.EvalEventMessage}
|
||||
*/
|
||||
proto.EvalEventMessage.deserializeBinaryFromReader = function(msg, reader) {
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup()) {
|
||||
break;
|
||||
}
|
||||
var field = reader.getFieldNumber();
|
||||
switch (field) {
|
||||
case 1:
|
||||
var value = /** @type {number} */ (reader.readUint64());
|
||||
msg.setId(value);
|
||||
break;
|
||||
case 2:
|
||||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.setEvent(value);
|
||||
break;
|
||||
case 3:
|
||||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.getArgsList().push(value);
|
||||
msg.setArgsList(msg.getArgsList());
|
||||
break;
|
||||
default:
|
||||
reader.skipField();
|
||||
break;
|
||||
}
|
||||
}
|
||||
return msg;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Class method variant: serializes the given message to binary data
|
||||
* (in protobuf wire format), writing to the given BinaryWriter.
|
||||
* @param {!proto.EvalEventMessage} message
|
||||
* @param {!jspb.BinaryWriter} writer
|
||||
*/
|
||||
proto.EvalEventMessage.serializeBinaryToWriter = function(message, writer) {
|
||||
message.serializeBinaryToWriter(writer);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Serializes the message to binary data (in protobuf wire format).
|
||||
* @return {!Uint8Array}
|
||||
*/
|
||||
proto.EvalEventMessage.prototype.serializeBinary = function() {
|
||||
var writer = new jspb.BinaryWriter();
|
||||
this.serializeBinaryToWriter(writer);
|
||||
return writer.getResultBuffer();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Serializes the message to binary data (in protobuf wire format),
|
||||
* writing to the given BinaryWriter.
|
||||
* @param {!jspb.BinaryWriter} writer
|
||||
*/
|
||||
proto.EvalEventMessage.prototype.serializeBinaryToWriter = function (writer) {
|
||||
var f = undefined;
|
||||
f = this.getId();
|
||||
if (f !== 0) {
|
||||
writer.writeUint64(
|
||||
1,
|
||||
f
|
||||
);
|
||||
}
|
||||
f = this.getEvent();
|
||||
if (f.length > 0) {
|
||||
writer.writeString(
|
||||
2,
|
||||
f
|
||||
);
|
||||
}
|
||||
f = this.getArgsList();
|
||||
if (f.length > 0) {
|
||||
writer.writeRepeatedString(
|
||||
3,
|
||||
f
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Creates a deep clone of this proto. No data is shared with the original.
|
||||
* @return {!proto.EvalEventMessage} The clone.
|
||||
*/
|
||||
proto.EvalEventMessage.prototype.cloneMessage = function() {
|
||||
return /** @type {!proto.EvalEventMessage} */ (jspb.Message.cloneMessage(this));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional uint64 id = 1;
|
||||
* @return {number}
|
||||
*/
|
||||
proto.EvalEventMessage.prototype.getId = function() {
|
||||
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0));
|
||||
};
|
||||
|
||||
|
||||
/** @param {number} value */
|
||||
proto.EvalEventMessage.prototype.setId = function(value) {
|
||||
jspb.Message.setField(this, 1, value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional string event = 2;
|
||||
* @return {string}
|
||||
*/
|
||||
proto.EvalEventMessage.prototype.getEvent = function() {
|
||||
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, ""));
|
||||
};
|
||||
|
||||
|
||||
/** @param {string} value */
|
||||
proto.EvalEventMessage.prototype.setEvent = function(value) {
|
||||
jspb.Message.setField(this, 2, value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* repeated string args = 3;
|
||||
* If you change this array by adding, removing or replacing elements, or if you
|
||||
* replace the array itself, then you must call the setter to update it.
|
||||
* @return {!Array.<string>}
|
||||
*/
|
||||
proto.EvalEventMessage.prototype.getArgsList = function() {
|
||||
return /** @type {!Array.<string>} */ (jspb.Message.getField(this, 3));
|
||||
};
|
||||
|
||||
|
||||
/** @param {Array.<string>} value */
|
||||
proto.EvalEventMessage.prototype.setArgsList = function(value) {
|
||||
jspb.Message.setField(this, 3, value || []);
|
||||
};
|
||||
|
||||
|
||||
proto.EvalEventMessage.prototype.clearArgsList = function() {
|
||||
jspb.Message.setField(this, 3, []);
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Generated by JsPbCodeGenerator.
|
||||
|
||||
Reference in New Issue
Block a user