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

Side by Side Diff: logdog/common/archive/archive.go

Issue 2435883002: LogDog: Fix archival Get/Tail implementations. (Closed)
Patch Set: LogDog: Fix archival Get/Tail implementations. Created 4 years, 2 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
OLDNEW
1 // Copyright 2015 The LUCI Authors. All rights reserved. 1 // Copyright 2015 The LUCI Authors. All rights reserved.
2 // Use of this source code is governed under the Apache License, Version 2.0 2 // Use of this source code is governed under the Apache License, Version 2.0
3 // that can be found in the LICENSE file. 3 // that can be found in the LICENSE file.
4 4
5 // Package archive constructs a LogDog archive out of log stream components. 5 // Package archive constructs a LogDog archive out of log stream components.
6 // Records are read from the stream and emitted as an archive. 6 // Records are read from the stream and emitted as an archive.
7 package archive 7 package archive
8 8
9 import ( 9 import (
10 "io" 10 "io"
11 11
12 "github.com/golang/protobuf/proto"
13 "github.com/luci/luci-go/common/data/recordio" 12 "github.com/luci/luci-go/common/data/recordio"
14 "github.com/luci/luci-go/common/errors" 13 "github.com/luci/luci-go/common/errors"
15 "github.com/luci/luci-go/common/logging" 14 "github.com/luci/luci-go/common/logging"
16 "github.com/luci/luci-go/common/sync/parallel" 15 "github.com/luci/luci-go/common/sync/parallel"
17 "github.com/luci/luci-go/logdog/api/logpb" 16 "github.com/luci/luci-go/logdog/api/logpb"
18 "github.com/luci/luci-go/logdog/common/renderer" 17 "github.com/luci/luci-go/logdog/common/renderer"
18
19 "github.com/golang/protobuf/proto"
19 ) 20 )
20 21
21 // Manifest is a set of archival parameters. 22 // Manifest is a set of archival parameters.
22 type Manifest struct { 23 type Manifest struct {
23 // Desc is the logpb.LogStreamDescriptor for the stream. 24 // Desc is the logpb.LogStreamDescriptor for the stream.
24 Desc *logpb.LogStreamDescriptor 25 Desc *logpb.LogStreamDescriptor
25 // Source is the LogEntry Source for the stream. 26 // Source is the LogEntry Source for the stream.
26 Source renderer.Source 27 Source renderer.Source
27 28
28 // LogWriter, if not nil, is the Writer to which the log stream record s tream 29 // LogWriter, if not nil, is the Writer to which the log stream record s tream
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 } 181 }
181 182
182 // Add this LogEntry to our index, noting the current offset. 183 // Add this LogEntry to our index, noting the current offset.
183 if idx != nil { 184 if idx != nil {
184 idx.addLogEntry(le, offset) 185 idx.addLogEntry(le, offset)
185 } 186 }
186 err = out(le) 187 err = out(le)
187 } 188 }
188 return err 189 return err
189 } 190 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698