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

Side by Side Diff: common/logdog/protocol/log.pb.go

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/log.proto ('k') | common/logdog/protocol/protoutil/doc.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 // Code generated by protoc-gen-go. 1 // Code generated by protoc-gen-go.
2 // source: log.proto 2 // source: log.proto
3 // DO NOT EDIT! 3 // DO NOT EDIT!
4 4
5 /* 5 /*
6 Package protocol is a generated protocol buffer package. 6 Package protocol is a generated protocol buffer package.
7 7
8 It is generated from these files: 8 It is generated from these files:
9 log.proto 9 log.proto
10 butler.proto 10 butler.proto
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 return "" 132 return ""
133 } 133 }
134 134
135 // * 135 // *
136 // An individual log entry. 136 // An individual log entry.
137 // 137 //
138 // This contains the superset of transmissible log data. Its content fields 138 // This contains the superset of transmissible log data. Its content fields
139 // should be interpreted in the context of the log stream's content type. 139 // should be interpreted in the context of the log stream's content type.
140 type LogEntry struct { 140 type LogEntry struct {
141 // 141 //
142 » // The stream time offset (in microseconds) for this entry (required). 142 » // The stream time offset for this entry (required).
143 // 143 //
144 // This offset is added to the log stream's base "timestamp" to resolve the 144 // This offset is added to the log stream's base "timestamp" to resolve the
145 // timestamp for this specific LogEntry. 145 // timestamp for this specific LogEntry.
146 » TimeOffsetUs *uint64 `protobuf:"varint,1,opt,name=time_offset_us" json:" time_offset_us,omitempty"` 146 » TimeOffset *TimeOffset `protobuf:"bytes,1,opt,name=time_offset" json:"ti me_offset,omitempty"`
147 // 147 //
148 // The message index within the Prefix (required). 148 // The message index within the Prefix (required).
149 // 149 //
150 // This is value is unique to this LogEntry across the entire set of ent ries 150 // This is value is unique to this LogEntry across the entire set of ent ries
151 // sharing the stream's Prefix. It is used to designate unambiguous log 151 // sharing the stream's Prefix. It is used to designate unambiguous log
152 // ordering. 152 // ordering.
153 » PrefixIndex *uint64 `protobuf:"varint,2,opt,name=prefix_index" json:"pre fix_index,omitempty"` 153 » PrefixIndex *uint32 `protobuf:"varint,2,opt,name=prefix_index" json:"pre fix_index,omitempty"`
154 // 154 //
155 // The message index within its Stream (required). 155 // The message index within its Stream (required).
156 // 156 //
157 // This value is unique across all entries sharing the same Prefix and S tream 157 // This value is unique across all entries sharing the same Prefix and S tream
158 // Name. It is used to designate unambiguous log ordering within the str eam. 158 // Name. It is used to designate unambiguous log ordering within the str eam.
159 » StreamIndex *uint64 `protobuf:"varint,3,opt,name=stream_index" json:"str eam_index,omitempty"` 159 » StreamIndex *uint32 `protobuf:"varint,3,opt,name=stream_index" json:"str eam_index,omitempty"`
160 // 160 //
161 // (Text) Lines of log text. 161 // (Text) Lines of log text.
162 // 162 //
163 // For text logs, each string represents a single log line. Newlines sho uld 163 // For text logs, each string represents a single log line. Newlines sho uld
164 // not be included. 164 // not be included.
165 » Lines []string `protobuf:"bytes,4,rep,name=lines" json:"lines,omitempty" ` 165 » Lines []string `protobuf:"bytes,4,rep,name=lines" jso n:"lines,omitempty"`
166 » // 166 » Data []*LogEntry_Data `protobuf:"bytes,5,rep,name=data" json :"data,omitempty"`
167 » // (Data) Log binary data. 167 » XXX_unrecognized []byte `json:"-"`
168 » //
169 » // For binary logs, each entry is a sequential chunk of log data. For
170 » // datagram logs, each entry is an independent datagram.
171 » Data [][]byte `protobuf:"bytes,5,rep,name=data" json:"data,o mitempty"`
172 » XXX_unrecognized []byte `json:"-"`
173 } 168 }
174 169
175 func (m *LogEntry) Reset() { *m = LogEntry{} } 170 func (m *LogEntry) Reset() { *m = LogEntry{} }
176 func (m *LogEntry) String() string { return proto.CompactTextString(m) } 171 func (m *LogEntry) String() string { return proto.CompactTextString(m) }
177 func (*LogEntry) ProtoMessage() {} 172 func (*LogEntry) ProtoMessage() {}
178 173
179 func (m *LogEntry) GetTimeOffsetUs() uint64 { 174 func (m *LogEntry) GetTimeOffset() *TimeOffset {
180 » if m != nil && m.TimeOffsetUs != nil { 175 » if m != nil {
181 » » return *m.TimeOffsetUs 176 » » return m.TimeOffset
182 } 177 }
183 » return 0 178 » return nil
184 } 179 }
185 180
186 func (m *LogEntry) GetPrefixIndex() uint64 { 181 func (m *LogEntry) GetPrefixIndex() uint32 {
187 if m != nil && m.PrefixIndex != nil { 182 if m != nil && m.PrefixIndex != nil {
188 return *m.PrefixIndex 183 return *m.PrefixIndex
189 } 184 }
190 return 0 185 return 0
191 } 186 }
192 187
193 func (m *LogEntry) GetStreamIndex() uint64 { 188 func (m *LogEntry) GetStreamIndex() uint32 {
194 if m != nil && m.StreamIndex != nil { 189 if m != nil && m.StreamIndex != nil {
195 return *m.StreamIndex 190 return *m.StreamIndex
196 } 191 }
197 return 0 192 return 0
198 } 193 }
199 194
200 func (m *LogEntry) GetLines() []string { 195 func (m *LogEntry) GetLines() []string {
201 if m != nil { 196 if m != nil {
202 return m.Lines 197 return m.Lines
203 } 198 }
204 return nil 199 return nil
205 } 200 }
206 201
207 func (m *LogEntry) GetData() [][]byte { 202 func (m *LogEntry) GetData() []*LogEntry_Data {
208 if m != nil { 203 if m != nil {
209 return m.Data 204 return m.Data
210 } 205 }
211 return nil 206 return nil
212 } 207 }
213 208
209 //
210 // (Data) Log binary data.
211 //
212 // For binary logs, each entry is a sequential chunk of log data. For
213 // datagram logs, each entry is an independent datagram.
214 type LogEntry_Data struct {
215 Value []byte `protobuf:"bytes,1,opt,name=value" json:"value,o mitempty"`
216 XXX_unrecognized []byte `json:"-"`
217 }
218
219 func (m *LogEntry_Data) Reset() { *m = LogEntry_Data{} }
220 func (m *LogEntry_Data) String() string { return proto.CompactTextString(m) }
221 func (*LogEntry_Data) ProtoMessage() {}
222
223 func (m *LogEntry_Data) GetValue() []byte {
224 if m != nil {
225 return m.Value
226 }
227 return nil
228 }
229
214 // * 230 // *
215 // LogIndex is an index into an at-rest log storage. 231 // LogIndex is an index into an at-rest log storage.
216 // 232 //
217 // The log stream and log index are generated by the Archivist during archival. 233 // The log stream and log index are generated by the Archivist during archival.
218 // 234 //
219 // An archived log stream is a series of contiguous LogEntry frames. The index 235 // An archived log stream is a series of contiguous LogEntry frames. The index
220 // maps a log's logical logation in its stream, prefix, and timeline to its 236 // maps a log's logical logation in its stream, prefix, and timeline to its
221 // frame's binary offset in the archived log stream blob. 237 // frame's binary offset in the archived log stream blob.
222 type LogIndex struct { 238 type LogIndex struct {
223 // 239 //
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 // Entry is a single index entry. 277 // Entry is a single index entry.
262 // 278 //
263 // The index is composed of a series of entries, each corresponding to a 279 // The index is composed of a series of entries, each corresponding to a
264 // sequential snapshot of of the log stream. 280 // sequential snapshot of of the log stream.
265 type LogIndex_Entry struct { 281 type LogIndex_Entry struct {
266 // 282 //
267 // The byte offset record in the indexed stream file (required). 283 // The byte offset record in the indexed stream file (required).
268 // 284 //
269 // This is used by clients to request specific LogEntry from an archived 285 // This is used by clients to request specific LogEntry from an archived
270 // log stream. 286 // log stream.
271 » Offset *uint64 `protobuf:"varint,1,opt,name=offset" json:"offset,omitemp ty"` 287 » Offset *uint32 `protobuf:"varint,1,opt,name=offset" json:"offset,omitemp ty"`
272 // 288 //
273 // The log index that this entry describes (required). 289 // The log index that this entry describes (required).
274 // 290 //
275 // This is used by clients to identify a specific LogEntry within a set of 291 // This is used by clients to identify a specific LogEntry within a set of
276 // streams sharing a Prefix. 292 // streams sharing a Prefix.
277 » PrefixIndex *uint64 `protobuf:"varint,2,opt,name=prefix_index" json:"pre fix_index,omitempty"` 293 » PrefixIndex *uint32 `protobuf:"varint,2,opt,name=prefix_index" json:"pre fix_index,omitempty"`
278 // 294 //
279 // The time offset of this log entry (required). 295 // The time offset of this log entry (required).
280 // 296 //
281 // This is used by clients to identify a specific LogEntry within a log 297 // This is used by clients to identify a specific LogEntry within a log
282 // stream. 298 // stream.
283 » StreamIndex *uint64 `protobuf:"varint,3,opt,name=stream_index" json:"str eam_index,omitempty"` 299 » StreamIndex *uint32 `protobuf:"varint,3,opt,name=stream_index" json:"str eam_index,omitempty"`
284 // 300 //
285 // The time offset of this log entry, in microseconds. 301 // The time offset of this log entry, in microseconds.
286 // 302 //
287 // This is added to the descriptor's "timestamp" field to identify the 303 // This is added to the descriptor's "timestamp" field to identify the
288 // specific timestamp of this log. It is used by clients to identify a 304 // specific timestamp of this log. It is used by clients to identify a
289 // specific LogEntry by time. 305 // specific LogEntry by time.
290 » TimeOffsetUs *uint64 `protobuf:"varint,4,opt,name=time_offset_us" js on:"time_offset_us,omitempty"` 306 » TimeOffsetUs *uint32 `protobuf:"varint,4,opt,name=time_offset_us" js on:"time_offset_us,omitempty"`
291 XXX_unrecognized []byte `json:"-"` 307 XXX_unrecognized []byte `json:"-"`
292 } 308 }
293 309
294 func (m *LogIndex_Entry) Reset() { *m = LogIndex_Entry{} } 310 func (m *LogIndex_Entry) Reset() { *m = LogIndex_Entry{} }
295 func (m *LogIndex_Entry) String() string { return proto.CompactTextString(m) } 311 func (m *LogIndex_Entry) String() string { return proto.CompactTextString(m) }
296 func (*LogIndex_Entry) ProtoMessage() {} 312 func (*LogIndex_Entry) ProtoMessage() {}
297 313
298 func (m *LogIndex_Entry) GetOffset() uint64 { 314 func (m *LogIndex_Entry) GetOffset() uint32 {
299 if m != nil && m.Offset != nil { 315 if m != nil && m.Offset != nil {
300 return *m.Offset 316 return *m.Offset
301 } 317 }
302 return 0 318 return 0
303 } 319 }
304 320
305 func (m *LogIndex_Entry) GetPrefixIndex() uint64 { 321 func (m *LogIndex_Entry) GetPrefixIndex() uint32 {
306 if m != nil && m.PrefixIndex != nil { 322 if m != nil && m.PrefixIndex != nil {
307 return *m.PrefixIndex 323 return *m.PrefixIndex
308 } 324 }
309 return 0 325 return 0
310 } 326 }
311 327
312 func (m *LogIndex_Entry) GetStreamIndex() uint64 { 328 func (m *LogIndex_Entry) GetStreamIndex() uint32 {
313 if m != nil && m.StreamIndex != nil { 329 if m != nil && m.StreamIndex != nil {
314 return *m.StreamIndex 330 return *m.StreamIndex
315 } 331 }
316 return 0 332 return 0
317 } 333 }
318 334
319 func (m *LogIndex_Entry) GetTimeOffsetUs() uint64 { 335 func (m *LogIndex_Entry) GetTimeOffsetUs() uint32 {
320 if m != nil && m.TimeOffsetUs != nil { 336 if m != nil && m.TimeOffsetUs != nil {
321 return *m.TimeOffsetUs 337 return *m.TimeOffsetUs
322 } 338 }
323 return 0 339 return 0
324 } 340 }
325 341
326 func init() { 342 func init() {
327 } 343 }
OLDNEW
« no previous file with comments | « common/logdog/protocol/log.proto ('k') | common/logdog/protocol/protoutil/doc.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698