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

Side by Side Diff: logdog/server/archivist/storageSource.go

Issue 2575383002: Add server/cache support to gaeconfig. (Closed)
Patch Set: Un-collapse. Created 3 years, 11 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 | « logdog/server/archivist/archivist_test.go ('k') | logdog/server/collector/collector.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 2016 The LUCI Authors. All rights reserved. 1 // Copyright 2016 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 archivist 5 package archivist
6 6
7 import ( 7 import (
8 "io" 8 "io"
9 9
10 log "github.com/luci/luci-go/common/logging" 10 log "github.com/luci/luci-go/common/logging"
11 "github.com/luci/luci-go/logdog/api/logpb" 11 "github.com/luci/luci-go/logdog/api/logpb"
12 "github.com/luci/luci-go/logdog/common/storage" 12 "github.com/luci/luci-go/logdog/common/storage"
13 "github.com/luci/luci-go/logdog/common/types" 13 "github.com/luci/luci-go/logdog/common/types"
14 "github.com/luci/luci-go/luci_config/common/cfgtypes" 14 "github.com/luci/luci-go/luci_config/common/cfgtypes"
15
15 "golang.org/x/net/context" 16 "golang.org/x/net/context"
16 ) 17 )
17 18
18 // storageSource is a renderer.Source that pulls log entries from intermediate 19 // storageSource is a renderer.Source that pulls log entries from intermediate
19 // storage via its storage.Storage instance. 20 // storage via its storage.Storage instance.
20 type storageSource struct { 21 type storageSource struct {
21 context.Context 22 context.Context
22 23
23 st storage.Storage // the storage instance to read from 24 st storage.Storage // the storage instance to read from
24 project cfgtypes.ProjectName // the path of the log stream 25 project cfgtypes.ProjectName // the path of the log stream
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 "index": sidx, 97 "index": sidx,
97 "terminalIndex": s.terminalIndex, 98 "terminalIndex": s.terminalIndex,
98 }.Warningf(s, "Discarding log entries beyond expected terminal i ndex.") 99 }.Warningf(s, "Discarding log entries beyond expected terminal i ndex.")
99 return nil, io.EOF 100 return nil, io.EOF
100 } 101 }
101 102
102 s.lastIndex = sidx 103 s.lastIndex = sidx
103 s.logEntryCount++ 104 s.logEntryCount++
104 return le, nil 105 return le, nil
105 } 106 }
OLDNEW
« no previous file with comments | « logdog/server/archivist/archivist_test.go ('k') | logdog/server/collector/collector.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698