UNPKG

skywalking-apache

Version:

The NodeJS agent for Apache SkyWalking

512 lines 18 kB
"use strict"; // source: service-mesh-probe/service-mesh.proto /** * @fileoverview * @enhanceable * @suppress {messageConventions} JS Compiler reports an error if a variable or * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); var common_Common_pb = require('../common/Common_pb.js'); goog.object.extend(proto, common_Common_pb); goog.exportSymbol('proto.MeshProbeDownstream', null, global); goog.exportSymbol('proto.Protocol', null, global); goog.exportSymbol('proto.ServiceMeshMetric', null, global); /** * 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.ServiceMeshMetric = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.ServiceMeshMetric, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.ServiceMeshMetric.displayName = 'proto.ServiceMeshMetric'; } /** * 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.MeshProbeDownstream = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.MeshProbeDownstream, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.MeshProbeDownstream.displayName = 'proto.MeshProbeDownstream'; } 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_<name>, 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.ServiceMeshMetric.prototype.toObject = function (opt_includeInstance) { return proto.ServiceMeshMetric.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.ServiceMeshMetric} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ServiceMeshMetric.toObject = function (includeInstance, msg) { var f, obj = { starttime: jspb.Message.getFieldWithDefault(msg, 1, 0), endtime: jspb.Message.getFieldWithDefault(msg, 2, 0), sourceservicename: jspb.Message.getFieldWithDefault(msg, 3, ""), sourceserviceinstance: jspb.Message.getFieldWithDefault(msg, 4, ""), destservicename: jspb.Message.getFieldWithDefault(msg, 5, ""), destserviceinstance: jspb.Message.getFieldWithDefault(msg, 6, ""), endpoint: jspb.Message.getFieldWithDefault(msg, 7, ""), latency: jspb.Message.getFieldWithDefault(msg, 8, 0), responsecode: jspb.Message.getFieldWithDefault(msg, 9, 0), status: jspb.Message.getBooleanFieldWithDefault(msg, 10, false), protocol: jspb.Message.getFieldWithDefault(msg, 11, 0), detectpoint: jspb.Message.getFieldWithDefault(msg, 12, 0) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.ServiceMeshMetric} */ proto.ServiceMeshMetric.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.ServiceMeshMetric; return proto.ServiceMeshMetric.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.ServiceMeshMetric} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.ServiceMeshMetric} */ proto.ServiceMeshMetric.deserializeBinaryFromReader = function (msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readInt64()); msg.setStarttime(value); break; case 2: var value = /** @type {number} */ (reader.readInt64()); msg.setEndtime(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.setSourceservicename(value); break; case 4: var value = /** @type {string} */ (reader.readString()); msg.setSourceserviceinstance(value); break; case 5: var value = /** @type {string} */ (reader.readString()); msg.setDestservicename(value); break; case 6: var value = /** @type {string} */ (reader.readString()); msg.setDestserviceinstance(value); break; case 7: var value = /** @type {string} */ (reader.readString()); msg.setEndpoint(value); break; case 8: var value = /** @type {number} */ (reader.readInt32()); msg.setLatency(value); break; case 9: var value = /** @type {number} */ (reader.readInt32()); msg.setResponsecode(value); break; case 10: var value = /** @type {boolean} */ (reader.readBool()); msg.setStatus(value); break; case 11: var value = /** @type {!proto.Protocol} */ (reader.readEnum()); msg.setProtocol(value); break; case 12: var value = /** @type {!proto.DetectPoint} */ (reader.readEnum()); msg.setDetectpoint(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.ServiceMeshMetric.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); proto.ServiceMeshMetric.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.ServiceMeshMetric} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ServiceMeshMetric.serializeBinaryToWriter = function (message, writer) { var f = undefined; f = message.getStarttime(); if (f !== 0) { writer.writeInt64(1, f); } f = message.getEndtime(); if (f !== 0) { writer.writeInt64(2, f); } f = message.getSourceservicename(); if (f.length > 0) { writer.writeString(3, f); } f = message.getSourceserviceinstance(); if (f.length > 0) { writer.writeString(4, f); } f = message.getDestservicename(); if (f.length > 0) { writer.writeString(5, f); } f = message.getDestserviceinstance(); if (f.length > 0) { writer.writeString(6, f); } f = message.getEndpoint(); if (f.length > 0) { writer.writeString(7, f); } f = message.getLatency(); if (f !== 0) { writer.writeInt32(8, f); } f = message.getResponsecode(); if (f !== 0) { writer.writeInt32(9, f); } f = message.getStatus(); if (f) { writer.writeBool(10, f); } f = message.getProtocol(); if (f !== 0.0) { writer.writeEnum(11, f); } f = message.getDetectpoint(); if (f !== 0.0) { writer.writeEnum(12, f); } }; /** * optional int64 startTime = 1; * @return {number} */ proto.ServiceMeshMetric.prototype.getStarttime = function () { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value * @return {!proto.ServiceMeshMetric} returns this */ proto.ServiceMeshMetric.prototype.setStarttime = function (value) { return jspb.Message.setProto3IntField(this, 1, value); }; /** * optional int64 endTime = 2; * @return {number} */ proto.ServiceMeshMetric.prototype.getEndtime = function () { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value * @return {!proto.ServiceMeshMetric} returns this */ proto.ServiceMeshMetric.prototype.setEndtime = function (value) { return jspb.Message.setProto3IntField(this, 2, value); }; /** * optional string sourceServiceName = 3; * @return {string} */ proto.ServiceMeshMetric.prototype.getSourceservicename = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value * @return {!proto.ServiceMeshMetric} returns this */ proto.ServiceMeshMetric.prototype.setSourceservicename = function (value) { return jspb.Message.setProto3StringField(this, 3, value); }; /** * optional string sourceServiceInstance = 4; * @return {string} */ proto.ServiceMeshMetric.prototype.getSourceserviceinstance = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** * @param {string} value * @return {!proto.ServiceMeshMetric} returns this */ proto.ServiceMeshMetric.prototype.setSourceserviceinstance = function (value) { return jspb.Message.setProto3StringField(this, 4, value); }; /** * optional string destServiceName = 5; * @return {string} */ proto.ServiceMeshMetric.prototype.getDestservicename = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; /** * @param {string} value * @return {!proto.ServiceMeshMetric} returns this */ proto.ServiceMeshMetric.prototype.setDestservicename = function (value) { return jspb.Message.setProto3StringField(this, 5, value); }; /** * optional string destServiceInstance = 6; * @return {string} */ proto.ServiceMeshMetric.prototype.getDestserviceinstance = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); }; /** * @param {string} value * @return {!proto.ServiceMeshMetric} returns this */ proto.ServiceMeshMetric.prototype.setDestserviceinstance = function (value) { return jspb.Message.setProto3StringField(this, 6, value); }; /** * optional string endpoint = 7; * @return {string} */ proto.ServiceMeshMetric.prototype.getEndpoint = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); }; /** * @param {string} value * @return {!proto.ServiceMeshMetric} returns this */ proto.ServiceMeshMetric.prototype.setEndpoint = function (value) { return jspb.Message.setProto3StringField(this, 7, value); }; /** * optional int32 latency = 8; * @return {number} */ proto.ServiceMeshMetric.prototype.getLatency = function () { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); }; /** * @param {number} value * @return {!proto.ServiceMeshMetric} returns this */ proto.ServiceMeshMetric.prototype.setLatency = function (value) { return jspb.Message.setProto3IntField(this, 8, value); }; /** * optional int32 responseCode = 9; * @return {number} */ proto.ServiceMeshMetric.prototype.getResponsecode = function () { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); }; /** * @param {number} value * @return {!proto.ServiceMeshMetric} returns this */ proto.ServiceMeshMetric.prototype.setResponsecode = function (value) { return jspb.Message.setProto3IntField(this, 9, value); }; /** * optional bool status = 10; * @return {boolean} */ proto.ServiceMeshMetric.prototype.getStatus = function () { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 10, false)); }; /** * @param {boolean} value * @return {!proto.ServiceMeshMetric} returns this */ proto.ServiceMeshMetric.prototype.setStatus = function (value) { return jspb.Message.setProto3BooleanField(this, 10, value); }; /** * optional Protocol protocol = 11; * @return {!proto.Protocol} */ proto.ServiceMeshMetric.prototype.getProtocol = function () { return /** @type {!proto.Protocol} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); }; /** * @param {!proto.Protocol} value * @return {!proto.ServiceMeshMetric} returns this */ proto.ServiceMeshMetric.prototype.setProtocol = function (value) { return jspb.Message.setProto3EnumField(this, 11, value); }; /** * optional DetectPoint detectPoint = 12; * @return {!proto.DetectPoint} */ proto.ServiceMeshMetric.prototype.getDetectpoint = function () { return /** @type {!proto.DetectPoint} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); }; /** * @param {!proto.DetectPoint} value * @return {!proto.ServiceMeshMetric} returns this */ proto.ServiceMeshMetric.prototype.setDetectpoint = function (value) { return jspb.Message.setProto3EnumField(this, 12, value); }; 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_<name>, 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.MeshProbeDownstream.prototype.toObject = function (opt_includeInstance) { return proto.MeshProbeDownstream.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.MeshProbeDownstream} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.MeshProbeDownstream.toObject = function (includeInstance, msg) { var f, obj = {}; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.MeshProbeDownstream} */ proto.MeshProbeDownstream.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.MeshProbeDownstream; return proto.MeshProbeDownstream.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.MeshProbeDownstream} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.MeshProbeDownstream} */ proto.MeshProbeDownstream.deserializeBinaryFromReader = function (msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.MeshProbeDownstream.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); proto.MeshProbeDownstream.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.MeshProbeDownstream} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.MeshProbeDownstream.serializeBinaryToWriter = function (message, writer) { var f = undefined; }; /** * @enum {number} */ proto.Protocol = { HTTP: 0, GRPC: 1 }; goog.object.extend(exports, proto); //# sourceMappingURL=service-mesh_pb.js.map