aboutsummaryrefslogtreecommitdiff
path: root/services
diff options
context:
space:
mode:
authorzpencer <spencerfang@google.com>2018-05-23 16:17:05 -0700
committerGitHub <noreply@github.com>2018-05-23 16:17:05 -0700
commit869363cdb8a737d47a53136894dd265c34ad9dae (patch)
tree3dd6802dc7efdb24084a316b850821a5e5123e9a /services
parent1aec9944758e64e1c5b5ba35b0da9d2524271814 (diff)
downloadgrpc-grpc-java-869363cdb8a737d47a53136894dd265c34ad9dae.tar.gz
services: sync binarylog.proto (#4500)
Sync from grpc/grpc-proto and rerun codegen.
Diffstat (limited to 'services')
-rw-r--r--services/src/generated/main/java/io/grpc/binarylog/BinaryLogProto.java42
-rw-r--r--services/src/generated/main/java/io/grpc/binarylog/GrpcLogEntry.java91
-rw-r--r--services/src/generated/main/java/io/grpc/binarylog/GrpcLogEntryOrBuilder.java9
-rw-r--r--services/src/generated/main/java/io/grpc/binarylog/Message.java12
-rw-r--r--services/src/generated/main/java/io/grpc/binarylog/MessageOrBuilder.java3
-rw-r--r--services/src/generated/main/java/io/grpc/binarylog/MetadataEntry.java16
-rw-r--r--services/src/generated/main/java/io/grpc/binarylog/MetadataEntryOrBuilder.java4
-rw-r--r--services/src/generated/main/java/io/grpc/binarylog/Peer.java231
-rw-r--r--services/src/generated/main/java/io/grpc/binarylog/PeerOrBuilder.java21
-rw-r--r--services/src/main/proto/io/grpc/binarylog.proto31
10 files changed, 364 insertions, 96 deletions
diff --git a/services/src/generated/main/java/io/grpc/binarylog/BinaryLogProto.java b/services/src/generated/main/java/io/grpc/binarylog/BinaryLogProto.java
index 19a7979e5..ae73c944f 100644
--- a/services/src/generated/main/java/io/grpc/binarylog/BinaryLogProto.java
+++ b/services/src/generated/main/java/io/grpc/binarylog/BinaryLogProto.java
@@ -54,7 +54,7 @@ public final class BinaryLogProto {
static {
java.lang.String[] descriptorData = {
"\n\027io/grpc/binarylog.proto\022\026grpc.binarylo" +
- "g.v1alpha\"\272\004\n\014GrpcLogEntry\0227\n\004type\030\001 \001(\016" +
+ "g.v1alpha\"\315\004\n\014GrpcLogEntry\0227\n\004type\030\001 \001(\016" +
"2).grpc.binarylog.v1alpha.GrpcLogEntry.T" +
"ype\022;\n\006logger\030\002 \001(\0162+.grpc.binarylog.v1a" +
"lpha.GrpcLogEntry.Logger\0220\n\007call_id\030\003 \001(" +
@@ -62,23 +62,25 @@ public final class BinaryLogProto {
"tadata\030\004 \001(\0132 .grpc.binarylog.v1alpha.Me" +
"tadataH\000\0222\n\007message\030\005 \001(\0132\037.grpc.binaryl" +
"og.v1alpha.MessageH\000\022*\n\004peer\030\006 \001(\0132\034.grp" +
- "c.binarylog.v1alpha.Peer\"\252\001\n\004Type\022\020\n\014UNK" +
- "NOWN_TYPE\020\000\022\031\n\025SEND_INITIAL_METADATA\020\001\022\032" +
- "\n\026SEND_TRAILING_METADATA\020\002\022\020\n\014SEND_MESSA" +
- "GE\020\003\022\031\n\025RECV_INITIAL_METADATA\020\004\022\032\n\026RECV_" +
- "TRAILING_METADATA\020\005\022\020\n\014RECV_MESSAGE\020\006\"4\n" +
- "\006Logger\022\022\n\016UNKNOWN_LOGGER\020\000\022\n\n\006CLIENT\020\001\022" +
- "\n\n\006SERVER\020\002B\t\n\007payload\"6\n\007Message\022\r\n\005fla" +
- "gs\030\001 \001(\r\022\016\n\006length\030\002 \001(\r\022\014\n\004data\030\003 \001(\014\"@" +
- "\n\010Metadata\0224\n\005entry\030\001 \003(\0132%.grpc.binaryl" +
- "og.v1alpha.MetadataEntry\"+\n\rMetadataEntr" +
- "y\022\013\n\003key\030\001 \001(\014\022\r\n\005value\030\002 \001(\014\"\235\001\n\004Peer\0228" +
- "\n\tpeer_type\030\001 \001(\0162%.grpc.binarylog.v1alp" +
- "ha.Peer.PeerType\022\014\n\004peer\030\002 \001(\014\"M\n\010PeerTy" +
- "pe\022\024\n\020UNKNOWN_PEERTYPE\020\000\022\r\n\tPEER_IPV4\020\001\022" +
- "\r\n\tPEER_IPV6\020\002\022\r\n\tPEER_UNIX\020\003\"$\n\007Uint128" +
- "\022\014\n\004high\030\001 \001(\006\022\013\n\003low\030\002 \001(\006B%\n\021io.grpc.b" +
- "inarylogB\016BinaryLogProtoP\001b\006proto3"
+ "c.binarylog.v1alpha.Peer\022\021\n\ttruncated\030\007 " +
+ "\001(\010\"\252\001\n\004Type\022\020\n\014UNKNOWN_TYPE\020\000\022\031\n\025SEND_I" +
+ "NITIAL_METADATA\020\001\022\032\n\026SEND_TRAILING_METAD" +
+ "ATA\020\002\022\020\n\014SEND_MESSAGE\020\003\022\031\n\025RECV_INITIAL_" +
+ "METADATA\020\004\022\032\n\026RECV_TRAILING_METADATA\020\005\022\020" +
+ "\n\014RECV_MESSAGE\020\006\"4\n\006Logger\022\022\n\016UNKNOWN_LO" +
+ "GGER\020\000\022\n\n\006CLIENT\020\001\022\n\n\006SERVER\020\002B\t\n\007payloa" +
+ "d\"6\n\007Message\022\r\n\005flags\030\001 \001(\r\022\016\n\006length\030\002 " +
+ "\001(\r\022\014\n\004data\030\003 \001(\014\"@\n\010Metadata\0224\n\005entry\030\001" +
+ " \003(\0132%.grpc.binarylog.v1alpha.MetadataEn" +
+ "try\"+\n\rMetadataEntry\022\013\n\003key\030\001 \001(\014\022\r\n\005val" +
+ "ue\030\002 \001(\014\"\277\001\n\004Peer\0228\n\tpeer_type\030\001 \001(\0162%.g" +
+ "rpc.binarylog.v1alpha.Peer.PeerType\022\014\n\004p" +
+ "eer\030\002 \001(\014\022\017\n\007address\030\003 \001(\t\022\017\n\007ip_port\030\004 " +
+ "\001(\r\"M\n\010PeerType\022\024\n\020UNKNOWN_PEERTYPE\020\000\022\r\n" +
+ "\tPEER_IPV4\020\001\022\r\n\tPEER_IPV6\020\002\022\r\n\tPEER_UNIX" +
+ "\020\003\"$\n\007Uint128\022\014\n\004high\030\001 \001(\006\022\013\n\003low\030\002 \001(\006" +
+ "B%\n\021io.grpc.binarylogB\016BinaryLogProtoP\001b" +
+ "\006proto3"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
@@ -97,7 +99,7 @@ public final class BinaryLogProto {
internal_static_grpc_binarylog_v1alpha_GrpcLogEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_grpc_binarylog_v1alpha_GrpcLogEntry_descriptor,
- new java.lang.String[] { "Type", "Logger", "CallId", "Metadata", "Message", "Peer", "Payload", });
+ new java.lang.String[] { "Type", "Logger", "CallId", "Metadata", "Message", "Peer", "Truncated", "Payload", });
internal_static_grpc_binarylog_v1alpha_Message_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_grpc_binarylog_v1alpha_Message_fieldAccessorTable = new
@@ -121,7 +123,7 @@ public final class BinaryLogProto {
internal_static_grpc_binarylog_v1alpha_Peer_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_grpc_binarylog_v1alpha_Peer_descriptor,
- new java.lang.String[] { "PeerType", "Peer", });
+ new java.lang.String[] { "PeerType", "Peer", "Address", "IpPort", });
internal_static_grpc_binarylog_v1alpha_Uint128_descriptor =
getDescriptor().getMessageTypes().get(5);
internal_static_grpc_binarylog_v1alpha_Uint128_fieldAccessorTable = new
diff --git a/services/src/generated/main/java/io/grpc/binarylog/GrpcLogEntry.java b/services/src/generated/main/java/io/grpc/binarylog/GrpcLogEntry.java
index 2bdfd7db2..88fa9f4c6 100644
--- a/services/src/generated/main/java/io/grpc/binarylog/GrpcLogEntry.java
+++ b/services/src/generated/main/java/io/grpc/binarylog/GrpcLogEntry.java
@@ -22,6 +22,7 @@ private static final long serialVersionUID = 0L;
private GrpcLogEntry() {
type_ = 0;
logger_ = 0;
+ truncated_ = false;
}
@java.lang.Override
@@ -121,6 +122,11 @@ private static final long serialVersionUID = 0L;
break;
}
+ case 56: {
+
+ truncated_ = input.readBool();
+ break;
+ }
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -155,10 +161,6 @@ private static final long serialVersionUID = 0L;
public enum Type
implements com.google.protobuf.ProtocolMessageEnum {
/**
- * <pre>
- * TODO(zpencer): upstream this
- * </pre>
- *
* <code>UNKNOWN_TYPE = 0;</code>
*/
UNKNOWN_TYPE(0),
@@ -190,10 +192,6 @@ private static final long serialVersionUID = 0L;
;
/**
- * <pre>
- * TODO(zpencer): upstream this
- * </pre>
- *
* <code>UNKNOWN_TYPE = 0;</code>
*/
public static final int UNKNOWN_TYPE_VALUE = 0;
@@ -310,10 +308,6 @@ private static final long serialVersionUID = 0L;
public enum Logger
implements com.google.protobuf.ProtocolMessageEnum {
/**
- * <pre>
- * TODO(zpencer): upstream this
- * </pre>
- *
* <code>UNKNOWN_LOGGER = 0;</code>
*/
UNKNOWN_LOGGER(0),
@@ -329,10 +323,6 @@ private static final long serialVersionUID = 0L;
;
/**
- * <pre>
- * TODO(zpencer): upstream this
- * </pre>
- *
* <code>UNKNOWN_LOGGER = 0;</code>
*/
public static final int UNKNOWN_LOGGER_VALUE = 0;
@@ -653,6 +643,19 @@ private static final long serialVersionUID = 0L;
return getPeer();
}
+ public static final int TRUNCATED_FIELD_NUMBER = 7;
+ private boolean truncated_;
+ /**
+ * <pre>
+ * true if payload does not represent the full message or metadata.
+ * </pre>
+ *
+ * <code>bool truncated = 7;</code>
+ */
+ public boolean getTruncated() {
+ return truncated_;
+ }
+
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
@@ -683,6 +686,9 @@ private static final long serialVersionUID = 0L;
if (peer_ != null) {
output.writeMessage(6, getPeer());
}
+ if (truncated_ != false) {
+ output.writeBool(7, truncated_);
+ }
unknownFields.writeTo(output);
}
@@ -715,6 +721,10 @@ private static final long serialVersionUID = 0L;
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, getPeer());
}
+ if (truncated_ != false) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBoolSize(7, truncated_);
+ }
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
@@ -743,6 +753,8 @@ private static final long serialVersionUID = 0L;
result = result && getPeer()
.equals(other.getPeer());
}
+ result = result && (getTruncated()
+ == other.getTruncated());
result = result && getPayloadCase().equals(
other.getPayloadCase());
if (!result) return false;
@@ -781,6 +793,9 @@ private static final long serialVersionUID = 0L;
hash = (37 * hash) + PEER_FIELD_NUMBER;
hash = (53 * hash) + getPeer().hashCode();
}
+ hash = (37 * hash) + TRUNCATED_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
+ getTruncated());
switch (payloadCase_) {
case 4:
hash = (37 * hash) + METADATA_FIELD_NUMBER;
@@ -942,6 +957,8 @@ private static final long serialVersionUID = 0L;
peer_ = null;
peerBuilder_ = null;
}
+ truncated_ = false;
+
payloadCase_ = 0;
payload_ = null;
return this;
@@ -992,6 +1009,7 @@ private static final long serialVersionUID = 0L;
} else {
result.peer_ = peerBuilder_.build();
}
+ result.truncated_ = truncated_;
result.payloadCase_ = payloadCase_;
onBuilt();
return result;
@@ -1046,6 +1064,9 @@ private static final long serialVersionUID = 0L;
if (other.hasPeer()) {
mergePeer(other.getPeer());
}
+ if (other.getTruncated() != false) {
+ setTruncated(other.getTruncated());
+ }
switch (other.getPayloadCase()) {
case METADATA: {
mergeMetadata(other.getMetadata());
@@ -1896,6 +1917,44 @@ private static final long serialVersionUID = 0L;
}
return peerBuilder_;
}
+
+ private boolean truncated_ ;
+ /**
+ * <pre>
+ * true if payload does not represent the full message or metadata.
+ * </pre>
+ *
+ * <code>bool truncated = 7;</code>
+ */
+ public boolean getTruncated() {
+ return truncated_;
+ }
+ /**
+ * <pre>
+ * true if payload does not represent the full message or metadata.
+ * </pre>
+ *
+ * <code>bool truncated = 7;</code>
+ */
+ public Builder setTruncated(boolean value) {
+
+ truncated_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * <pre>
+ * true if payload does not represent the full message or metadata.
+ * </pre>
+ *
+ * <code>bool truncated = 7;</code>
+ */
+ public Builder clearTruncated() {
+
+ truncated_ = false;
+ onChanged();
+ return this;
+ }
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
diff --git a/services/src/generated/main/java/io/grpc/binarylog/GrpcLogEntryOrBuilder.java b/services/src/generated/main/java/io/grpc/binarylog/GrpcLogEntryOrBuilder.java
index de4d9b9f4..abe1f54fd 100644
--- a/services/src/generated/main/java/io/grpc/binarylog/GrpcLogEntryOrBuilder.java
+++ b/services/src/generated/main/java/io/grpc/binarylog/GrpcLogEntryOrBuilder.java
@@ -147,5 +147,14 @@ public interface GrpcLogEntryOrBuilder extends
*/
io.grpc.binarylog.PeerOrBuilder getPeerOrBuilder();
+ /**
+ * <pre>
+ * true if payload does not represent the full message or metadata.
+ * </pre>
+ *
+ * <code>bool truncated = 7;</code>
+ */
+ boolean getTruncated();
+
public io.grpc.binarylog.GrpcLogEntry.PayloadCase getPayloadCase();
}
diff --git a/services/src/generated/main/java/io/grpc/binarylog/Message.java b/services/src/generated/main/java/io/grpc/binarylog/Message.java
index 1f5bdddca..46f77c48d 100644
--- a/services/src/generated/main/java/io/grpc/binarylog/Message.java
+++ b/services/src/generated/main/java/io/grpc/binarylog/Message.java
@@ -130,8 +130,7 @@ private static final long serialVersionUID = 0L;
private com.google.protobuf.ByteString data_;
/**
* <pre>
- * Binary payload, post compression (depends on the flags field), may be
- * truncated or omitted.
+ * May be truncated or omitted.
* </pre>
*
* <code>bytes data = 3;</code>
@@ -555,8 +554,7 @@ private static final long serialVersionUID = 0L;
private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY;
/**
* <pre>
- * Binary payload, post compression (depends on the flags field), may be
- * truncated or omitted.
+ * May be truncated or omitted.
* </pre>
*
* <code>bytes data = 3;</code>
@@ -566,8 +564,7 @@ private static final long serialVersionUID = 0L;
}
/**
* <pre>
- * Binary payload, post compression (depends on the flags field), may be
- * truncated or omitted.
+ * May be truncated or omitted.
* </pre>
*
* <code>bytes data = 3;</code>
@@ -583,8 +580,7 @@ private static final long serialVersionUID = 0L;
}
/**
* <pre>
- * Binary payload, post compression (depends on the flags field), may be
- * truncated or omitted.
+ * May be truncated or omitted.
* </pre>
*
* <code>bytes data = 3;</code>
diff --git a/services/src/generated/main/java/io/grpc/binarylog/MessageOrBuilder.java b/services/src/generated/main/java/io/grpc/binarylog/MessageOrBuilder.java
index 9d905230f..4dff0d343 100644
--- a/services/src/generated/main/java/io/grpc/binarylog/MessageOrBuilder.java
+++ b/services/src/generated/main/java/io/grpc/binarylog/MessageOrBuilder.java
@@ -32,8 +32,7 @@ public interface MessageOrBuilder extends
/**
* <pre>
- * Binary payload, post compression (depends on the flags field), may be
- * truncated or omitted.
+ * May be truncated or omitted.
* </pre>
*
* <code>bytes data = 3;</code>
diff --git a/services/src/generated/main/java/io/grpc/binarylog/MetadataEntry.java b/services/src/generated/main/java/io/grpc/binarylog/MetadataEntry.java
index b04500f8c..080d549b2 100644
--- a/services/src/generated/main/java/io/grpc/binarylog/MetadataEntry.java
+++ b/services/src/generated/main/java/io/grpc/binarylog/MetadataEntry.java
@@ -92,10 +92,6 @@ private static final long serialVersionUID = 0L;
public static final int KEY_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString key_;
/**
- * <pre>
- * TODO(zpencer): upstream this
- * </pre>
- *
* <code>bytes key = 1;</code>
*/
public com.google.protobuf.ByteString getKey() {
@@ -417,20 +413,12 @@ private static final long serialVersionUID = 0L;
private com.google.protobuf.ByteString key_ = com.google.protobuf.ByteString.EMPTY;
/**
- * <pre>
- * TODO(zpencer): upstream this
- * </pre>
- *
* <code>bytes key = 1;</code>
*/
public com.google.protobuf.ByteString getKey() {
return key_;
}
/**
- * <pre>
- * TODO(zpencer): upstream this
- * </pre>
- *
* <code>bytes key = 1;</code>
*/
public Builder setKey(com.google.protobuf.ByteString value) {
@@ -443,10 +431,6 @@ private static final long serialVersionUID = 0L;
return this;
}
/**
- * <pre>
- * TODO(zpencer): upstream this
- * </pre>
- *
* <code>bytes key = 1;</code>
*/
public Builder clearKey() {
diff --git a/services/src/generated/main/java/io/grpc/binarylog/MetadataEntryOrBuilder.java b/services/src/generated/main/java/io/grpc/binarylog/MetadataEntryOrBuilder.java
index 9271efcb7..856f8bc71 100644
--- a/services/src/generated/main/java/io/grpc/binarylog/MetadataEntryOrBuilder.java
+++ b/services/src/generated/main/java/io/grpc/binarylog/MetadataEntryOrBuilder.java
@@ -8,10 +8,6 @@ public interface MetadataEntryOrBuilder extends
com.google.protobuf.MessageOrBuilder {
/**
- * <pre>
- * TODO(zpencer): upstream this
- * </pre>
- *
* <code>bytes key = 1;</code>
*/
com.google.protobuf.ByteString getKey();
diff --git a/services/src/generated/main/java/io/grpc/binarylog/Peer.java b/services/src/generated/main/java/io/grpc/binarylog/Peer.java
index 6aa963f61..843affadf 100644
--- a/services/src/generated/main/java/io/grpc/binarylog/Peer.java
+++ b/services/src/generated/main/java/io/grpc/binarylog/Peer.java
@@ -22,6 +22,8 @@ private static final long serialVersionUID = 0L;
private Peer() {
peerType_ = 0;
peer_ = com.google.protobuf.ByteString.EMPTY;
+ address_ = "";
+ ipPort_ = 0;
}
@java.lang.Override
@@ -66,6 +68,17 @@ private static final long serialVersionUID = 0L;
peer_ = input.readBytes();
break;
}
+ case 26: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ address_ = s;
+ break;
+ }
+ case 32: {
+
+ ipPort_ = input.readUInt32();
+ break;
+ }
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -96,16 +109,12 @@ private static final long serialVersionUID = 0L;
public enum PeerType
implements com.google.protobuf.ProtocolMessageEnum {
/**
- * <pre>
- * TODO(zpencer): upstream this
- * </pre>
- *
* <code>UNKNOWN_PEERTYPE = 0;</code>
*/
UNKNOWN_PEERTYPE(0),
/**
* <pre>
- * peer is struct sockaddr_in
+ * address is the address in 1.2.3.4 form
* </pre>
*
* <code>PEER_IPV4 = 1;</code>
@@ -113,7 +122,8 @@ private static final long serialVersionUID = 0L;
PEER_IPV4(1),
/**
* <pre>
- * peer is struct sockaddr_in6
+ * address the address in canonical form (RFC5952 section 4)
+ * The scope is NOT included in the peer string.
* </pre>
*
* <code>PEER_IPV6 = 2;</code>
@@ -121,7 +131,7 @@ private static final long serialVersionUID = 0L;
PEER_IPV6(2),
/**
* <pre>
- * peer is struct sockaddr_un
+ * address is UDS string
* </pre>
*
* <code>PEER_UNIX = 3;</code>
@@ -131,16 +141,12 @@ private static final long serialVersionUID = 0L;
;
/**
- * <pre>
- * TODO(zpencer): upstream this
- * </pre>
- *
* <code>UNKNOWN_PEERTYPE = 0;</code>
*/
public static final int UNKNOWN_PEERTYPE_VALUE = 0;
/**
* <pre>
- * peer is struct sockaddr_in
+ * address is the address in 1.2.3.4 form
* </pre>
*
* <code>PEER_IPV4 = 1;</code>
@@ -148,7 +154,8 @@ private static final long serialVersionUID = 0L;
public static final int PEER_IPV4_VALUE = 1;
/**
* <pre>
- * peer is struct sockaddr_in6
+ * address the address in canonical form (RFC5952 section 4)
+ * The scope is NOT included in the peer string.
* </pre>
*
* <code>PEER_IPV6 = 2;</code>
@@ -156,7 +163,7 @@ private static final long serialVersionUID = 0L;
public static final int PEER_IPV6_VALUE = 2;
/**
* <pre>
- * peer is struct sockaddr_un
+ * address is UDS string
* </pre>
*
* <code>PEER_UNIX = 3;</code>
@@ -258,7 +265,7 @@ private static final long serialVersionUID = 0L;
private com.google.protobuf.ByteString peer_;
/**
* <pre>
- * value depends on peer_type
+ * will be removed: do not use
* </pre>
*
* <code>bytes peer = 2;</code>
@@ -267,6 +274,53 @@ private static final long serialVersionUID = 0L;
return peer_;
}
+ public static final int ADDRESS_FIELD_NUMBER = 3;
+ private volatile java.lang.Object address_;
+ /**
+ * <code>string address = 3;</code>
+ */
+ public java.lang.String getAddress() {
+ java.lang.Object ref = address_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ address_ = s;
+ return s;
+ }
+ }
+ /**
+ * <code>string address = 3;</code>
+ */
+ public com.google.protobuf.ByteString
+ getAddressBytes() {
+ java.lang.Object ref = address_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ address_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int IP_PORT_FIELD_NUMBER = 4;
+ private int ipPort_;
+ /**
+ * <pre>
+ * only for PEER_IPV4 and PEER_IPV6
+ * </pre>
+ *
+ * <code>uint32 ip_port = 4;</code>
+ */
+ public int getIpPort() {
+ return ipPort_;
+ }
+
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
@@ -285,6 +339,12 @@ private static final long serialVersionUID = 0L;
if (!peer_.isEmpty()) {
output.writeBytes(2, peer_);
}
+ if (!getAddressBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, address_);
+ }
+ if (ipPort_ != 0) {
+ output.writeUInt32(4, ipPort_);
+ }
unknownFields.writeTo(output);
}
@@ -301,6 +361,13 @@ private static final long serialVersionUID = 0L;
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, peer_);
}
+ if (!getAddressBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, address_);
+ }
+ if (ipPort_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeUInt32Size(4, ipPort_);
+ }
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
@@ -320,6 +387,10 @@ private static final long serialVersionUID = 0L;
result = result && peerType_ == other.peerType_;
result = result && getPeer()
.equals(other.getPeer());
+ result = result && getAddress()
+ .equals(other.getAddress());
+ result = result && (getIpPort()
+ == other.getIpPort());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@@ -335,6 +406,10 @@ private static final long serialVersionUID = 0L;
hash = (53 * hash) + peerType_;
hash = (37 * hash) + PEER_FIELD_NUMBER;
hash = (53 * hash) + getPeer().hashCode();
+ hash = (37 * hash) + ADDRESS_FIELD_NUMBER;
+ hash = (53 * hash) + getAddress().hashCode();
+ hash = (37 * hash) + IP_PORT_FIELD_NUMBER;
+ hash = (53 * hash) + getIpPort();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
@@ -472,6 +547,10 @@ private static final long serialVersionUID = 0L;
peer_ = com.google.protobuf.ByteString.EMPTY;
+ address_ = "";
+
+ ipPort_ = 0;
+
return this;
}
@@ -496,6 +575,8 @@ private static final long serialVersionUID = 0L;
io.grpc.binarylog.Peer result = new io.grpc.binarylog.Peer(this);
result.peerType_ = peerType_;
result.peer_ = peer_;
+ result.address_ = address_;
+ result.ipPort_ = ipPort_;
onBuilt();
return result;
}
@@ -543,6 +624,13 @@ private static final long serialVersionUID = 0L;
if (other.getPeer() != com.google.protobuf.ByteString.EMPTY) {
setPeer(other.getPeer());
}
+ if (!other.getAddress().isEmpty()) {
+ address_ = other.address_;
+ onChanged();
+ }
+ if (other.getIpPort() != 0) {
+ setIpPort(other.getIpPort());
+ }
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
@@ -617,7 +705,7 @@ private static final long serialVersionUID = 0L;
private com.google.protobuf.ByteString peer_ = com.google.protobuf.ByteString.EMPTY;
/**
* <pre>
- * value depends on peer_type
+ * will be removed: do not use
* </pre>
*
* <code>bytes peer = 2;</code>
@@ -627,7 +715,7 @@ private static final long serialVersionUID = 0L;
}
/**
* <pre>
- * value depends on peer_type
+ * will be removed: do not use
* </pre>
*
* <code>bytes peer = 2;</code>
@@ -643,7 +731,7 @@ private static final long serialVersionUID = 0L;
}
/**
* <pre>
- * value depends on peer_type
+ * will be removed: do not use
* </pre>
*
* <code>bytes peer = 2;</code>
@@ -654,6 +742,113 @@ private static final long serialVersionUID = 0L;
onChanged();
return this;
}
+
+ private java.lang.Object address_ = "";
+ /**
+ * <code>string address = 3;</code>
+ */
+ public java.lang.String getAddress() {
+ java.lang.Object ref = address_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ address_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * <code>string address = 3;</code>
+ */
+ public com.google.protobuf.ByteString
+ getAddressBytes() {
+ java.lang.Object ref = address_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ address_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * <code>string address = 3;</code>
+ */
+ public Builder setAddress(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ address_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>string address = 3;</code>
+ */
+ public Builder clearAddress() {
+
+ address_ = getDefaultInstance().getAddress();
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>string address = 3;</code>
+ */
+ public Builder setAddressBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ address_ = value;
+ onChanged();
+ return this;
+ }
+
+ private int ipPort_ ;
+ /**
+ * <pre>
+ * only for PEER_IPV4 and PEER_IPV6
+ * </pre>
+ *
+ * <code>uint32 ip_port = 4;</code>
+ */
+ public int getIpPort() {
+ return ipPort_;
+ }
+ /**
+ * <pre>
+ * only for PEER_IPV4 and PEER_IPV6
+ * </pre>
+ *
+ * <code>uint32 ip_port = 4;</code>
+ */
+ public Builder setIpPort(int value) {
+
+ ipPort_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * <pre>
+ * only for PEER_IPV4 and PEER_IPV6
+ * </pre>
+ *
+ * <code>uint32 ip_port = 4;</code>
+ */
+ public Builder clearIpPort() {
+
+ ipPort_ = 0;
+ onChanged();
+ return this;
+ }
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
diff --git a/services/src/generated/main/java/io/grpc/binarylog/PeerOrBuilder.java b/services/src/generated/main/java/io/grpc/binarylog/PeerOrBuilder.java
index 247a59c8b..3c576dcca 100644
--- a/services/src/generated/main/java/io/grpc/binarylog/PeerOrBuilder.java
+++ b/services/src/generated/main/java/io/grpc/binarylog/PeerOrBuilder.java
@@ -18,10 +18,29 @@ public interface PeerOrBuilder extends
/**
* <pre>
- * value depends on peer_type
+ * will be removed: do not use
* </pre>
*
* <code>bytes peer = 2;</code>
*/
com.google.protobuf.ByteString getPeer();
+
+ /**
+ * <code>string address = 3;</code>
+ */
+ java.lang.String getAddress();
+ /**
+ * <code>string address = 3;</code>
+ */
+ com.google.protobuf.ByteString
+ getAddressBytes();
+
+ /**
+ * <pre>
+ * only for PEER_IPV4 and PEER_IPV6
+ * </pre>
+ *
+ * <code>uint32 ip_port = 4;</code>
+ */
+ int getIpPort();
}
diff --git a/services/src/main/proto/io/grpc/binarylog.proto b/services/src/main/proto/io/grpc/binarylog.proto
index e8c91945c..5c5e1bbf1 100644
--- a/services/src/main/proto/io/grpc/binarylog.proto
+++ b/services/src/main/proto/io/grpc/binarylog.proto
@@ -1,4 +1,4 @@
-// Copyright 2016 The gRPC Authors
+// Copyright 2018 The gRPC Authors
// All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -26,7 +26,7 @@ option java_outer_classname = "BinaryLogProto";
message GrpcLogEntry {
// Enumerates the type of logs
enum Type {
- UNKNOWN_TYPE = 0; // TODO(zpencer): upstream this
+ UNKNOWN_TYPE = 0;
SEND_INITIAL_METADATA = 1;
SEND_TRAILING_METADATA = 2;
SEND_MESSAGE = 3;
@@ -37,7 +37,7 @@ message GrpcLogEntry {
// Enumerates the entity that generates the log entry
enum Logger {
- UNKNOWN_LOGGER = 0; // TODO(zpencer): upstream this
+ UNKNOWN_LOGGER = 0;
CLIENT = 1;
SERVER = 2;
}
@@ -61,6 +61,9 @@ message GrpcLogEntry {
// Peer address information, will only be recorded in SEND_INITIAL_METADATA
// and RECV_INITIAL_METADATA entries.
Peer peer = 6;
+
+ // true if payload does not represent the full message or metadata.
+ bool truncated = 7;
};
// Message payload, used by REQUEST and RESPONSE
@@ -74,8 +77,7 @@ message Message {
// Length of the message. It may not be the same as the length of the
// data field, as the logging payload can be truncated or omitted.
uint32 length = 2;
- // Binary payload, post compression (depends on the flags field), may be
- // truncated or omitted.
+ // May be truncated or omitted.
bytes data = 3;
}
@@ -89,20 +91,27 @@ message Metadata {
// A metadata key value pair
message MetadataEntry {
- bytes key = 1; // TODO(zpencer): upstream this
+ bytes key = 1;
bytes value = 2;
}
// Peer information
message Peer {
enum PeerType {
- UNKNOWN_PEERTYPE = 0; // TODO(zpencer): upstream this
- PEER_IPV4 = 1; // peer is struct sockaddr_in
- PEER_IPV6 = 2; // peer is struct sockaddr_in6
- PEER_UNIX = 3; // peer is struct sockaddr_un
+ UNKNOWN_PEERTYPE = 0;
+ // address is the address in 1.2.3.4 form
+ PEER_IPV4 = 1;
+ // address the address in canonical form (RFC5952 section 4)
+ // The scope is NOT included in the peer string.
+ PEER_IPV6 = 2;
+ // address is UDS string
+ PEER_UNIX = 3;
};
PeerType peer_type = 1;
- bytes peer = 2; // value depends on peer_type
+ bytes peer = 2; // will be removed: do not use
+ string address = 3;
+ // only for PEER_IPV4 and PEER_IPV6
+ uint32 ip_port = 4;
}
// Used to record call_id.