Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Side by Side Diff: common/logdog/protocol/log.proto

Issue 1272893004: LogDog: Update protobufs, add support library. (Closed) Base URL: https://github.com/luci/luci-go@master
Patch Set: Update comment. Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « common/logdog/protocol/butler.pb.go ('k') | common/logdog/protocol/log.pb.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package protocol; 5 package protocol;
6 6
7 import "types.proto"; 7 import "types.proto";
8 8
9 /** 9 /**
10 * Log stream descriptor data. This is the full set of information that 10 * Log stream descriptor data. This is the full set of information that
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 } 62 }
63 63
64 /** 64 /**
65 * An individual log entry. 65 * An individual log entry.
66 * 66 *
67 * This contains the superset of transmissible log data. Its content fields 67 * This contains the superset of transmissible log data. Its content fields
68 * should be interpreted in the context of the log stream's content type. 68 * should be interpreted in the context of the log stream's content type.
69 */ 69 */
70 message LogEntry { 70 message LogEntry {
71 /* 71 /*
72 * The stream time offset (in microseconds) for this entry (required). 72 * The stream time offset for this entry (required).
73 * 73 *
74 * This offset is added to the log stream's base "timestamp" to resolve the 74 * This offset is added to the log stream's base "timestamp" to resolve the
75 * timestamp for this specific LogEntry. 75 * timestamp for this specific LogEntry.
76 */ 76 */
77 optional uint64 time_offset_us = 1; 77 optional TimeOffset time_offset = 1;
78 /* 78 /*
79 * The message index within the Prefix (required). 79 * The message index within the Prefix (required).
80 * 80 *
81 * This is value is unique to this LogEntry across the entire set of entries 81 * This is value is unique to this LogEntry across the entire set of entries
82 * sharing the stream's Prefix. It is used to designate unambiguous log 82 * sharing the stream's Prefix. It is used to designate unambiguous log
83 * ordering. 83 * ordering.
84 */ 84 */
85 optional uint64 prefix_index = 2; 85 optional uint32 prefix_index = 2;
86 /* 86 /*
87 * The message index within its Stream (required). 87 * The message index within its Stream (required).
88 * 88 *
89 * This value is unique across all entries sharing the same Prefix and Stream 89 * This value is unique across all entries sharing the same Prefix and Stream
90 * Name. It is used to designate unambiguous log ordering within the stream. 90 * Name. It is used to designate unambiguous log ordering within the stream.
91 */ 91 */
92 optional uint64 stream_index = 3; 92 optional uint32 stream_index = 3;
93 93
94 /* 94 /*
95 * (Text) Lines of log text. 95 * (Text) Lines of log text.
96 * 96 *
97 * For text logs, each string represents a single log line. Newlines should 97 * For text logs, each string represents a single log line. Newlines should
98 * not be included. 98 * not be included.
99 */ 99 */
100 repeated string lines = 4; 100 repeated string lines = 4;
101 101
102 /* 102 /*
103 * (Data) Log binary data. 103 * (Data) Log binary data.
104 * 104 *
105 * For binary logs, each entry is a sequential chunk of log data. For 105 * For binary logs, each entry is a sequential chunk of log data. For
106 * datagram logs, each entry is an independent datagram. 106 * datagram logs, each entry is an independent datagram.
107 */ 107 */
108 repeated bytes data = 5; 108 message Data {
109 optional bytes value = 1;
110 }
111 repeated Data data = 5;
109 } 112 }
110 113
111 /** 114 /**
112 * LogIndex is an index into an at-rest log storage. 115 * LogIndex is an index into an at-rest log storage.
113 * 116 *
114 * The log stream and log index are generated by the Archivist during archival. 117 * The log stream and log index are generated by the Archivist during archival.
115 * 118 *
116 * An archived log stream is a series of contiguous LogEntry frames. The index 119 * An archived log stream is a series of contiguous LogEntry frames. The index
117 * maps a log's logical logation in its stream, prefix, and timeline to its 120 * maps a log's logical logation in its stream, prefix, and timeline to its
118 * frame's binary offset in the archived log stream blob. 121 * frame's binary offset in the archived log stream blob.
(...skipping 13 matching lines...) Expand all
132 * The index is composed of a series of entries, each corresponding to a 135 * The index is composed of a series of entries, each corresponding to a
133 * sequential snapshot of of the log stream. 136 * sequential snapshot of of the log stream.
134 */ 137 */
135 message Entry { 138 message Entry {
136 /* 139 /*
137 * The byte offset record in the indexed stream file (required). 140 * The byte offset record in the indexed stream file (required).
138 * 141 *
139 * This is used by clients to request specific LogEntry from an archived 142 * This is used by clients to request specific LogEntry from an archived
140 * log stream. 143 * log stream.
141 */ 144 */
142 optional uint64 offset = 1; 145 optional uint32 offset = 1;
143 146
144 /* 147 /*
145 * The log index that this entry describes (required). 148 * The log index that this entry describes (required).
146 * 149 *
147 * This is used by clients to identify a specific LogEntry within a set of 150 * This is used by clients to identify a specific LogEntry within a set of
148 * streams sharing a Prefix. 151 * streams sharing a Prefix.
149 */ 152 */
150 optional uint64 prefix_index = 2; 153 optional uint32 prefix_index = 2;
151 /* 154 /*
152 * The time offset of this log entry (required). 155 * The time offset of this log entry (required).
153 * 156 *
154 * This is used by clients to identify a specific LogEntry within a log 157 * This is used by clients to identify a specific LogEntry within a log
155 * stream. 158 * stream.
156 */ 159 */
157 optional uint64 stream_index = 3; 160 optional uint32 stream_index = 3;
158 /* 161 /*
159 * The time offset of this log entry, in microseconds. 162 * The time offset of this log entry, in microseconds.
160 * 163 *
161 * This is added to the descriptor's "timestamp" field to identify the 164 * This is added to the descriptor's "timestamp" field to identify the
162 * specific timestamp of this log. It is used by clients to identify a 165 * specific timestamp of this log. It is used by clients to identify a
163 * specific LogEntry by time. 166 * specific LogEntry by time.
164 */ 167 */
165 optional uint64 time_offset_us = 4; 168 optional uint32 time_offset_us = 4;
166 } 169 }
167 /* 170 /*
168 * A series of ascending-ordered Entry messages representing snapshots of an 171 * A series of ascending-ordered Entry messages representing snapshots of an
169 * archived log stream. 172 * archived log stream.
170 * 173 *
171 * Within this set of Entry messages, the "offset", "prefix_index", 174 * Within this set of Entry messages, the "offset", "prefix_index",
172 * "stream_index", and "time_offset_us" fields will be ascending. 175 * "stream_index", and "time_offset_us" fields will be ascending.
173 * 176 *
174 * The frequency of Entry messages is not defined; it is up to the Archivist 177 * The frequency of Entry messages is not defined; it is up to the Archivist
175 * process to choose a frequency. 178 * process to choose a frequency.
176 */ 179 */
177 repeated Entry entries = 2; 180 repeated Entry entries = 2;
178 } 181 }
OLDNEW
« no previous file with comments | « common/logdog/protocol/butler.pb.go ('k') | common/logdog/protocol/log.pb.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698