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

Unified Diff: logdog/common/storage/memory/memory.go

Issue 2626433004: Move "common/config" common types into cfgtypes. (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « logdog/common/storage/bigtable/storage_test.go ('k') | logdog/common/storage/memory/memory_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: logdog/common/storage/memory/memory.go
diff --git a/logdog/common/storage/memory/memory.go b/logdog/common/storage/memory/memory.go
index 8186971f32a24b00e8fc896a2c947c224706f32e..26e7f4dc867c60e6e245dad63dfb84765c18da3c 100644
--- a/logdog/common/storage/memory/memory.go
+++ b/logdog/common/storage/memory/memory.go
@@ -9,9 +9,9 @@ import (
"sync"
"time"
- "github.com/luci/luci-go/common/config"
"github.com/luci/luci-go/logdog/common/storage"
"github.com/luci/luci-go/logdog/common/types"
+ "github.com/luci/luci-go/luci_config/common/cfgtypes"
)
type logStream struct {
@@ -25,7 +25,7 @@ type rec struct {
}
type streamKey struct {
- project config.ProjectName
+ project cfgtypes.ProjectName
path types.StreamPath
}
@@ -150,7 +150,7 @@ func (s *Storage) Get(req storage.GetRequest, cb storage.GetCallback) error {
}
// Tail implements storage.Storage.
-func (s *Storage) Tail(project config.ProjectName, path types.StreamPath) (*storage.Entry, error) {
+func (s *Storage) Tail(project cfgtypes.ProjectName, path types.StreamPath) (*storage.Entry, error) {
var r *rec
// Find the latest log, then return it.
@@ -173,7 +173,7 @@ func (s *Storage) Tail(project config.ProjectName, path types.StreamPath) (*stor
}
// Count returns the number of log records for the given stream.
-func (s *Storage) Count(project config.ProjectName, path types.StreamPath) (c int) {
+func (s *Storage) Count(project cfgtypes.ProjectName, path types.StreamPath) (c int) {
s.run(func() error {
if st := s.getLogStreamLocked(project, path, false); st != nil {
c = len(st.logs)
@@ -204,7 +204,7 @@ func (s *Storage) run(f func() error) error {
return f()
}
-func (s *Storage) getLogStreamLocked(project config.ProjectName, path types.StreamPath, create bool) *logStream {
+func (s *Storage) getLogStreamLocked(project cfgtypes.ProjectName, path types.StreamPath, create bool) *logStream {
key := streamKey{
project: project,
path: path,
« no previous file with comments | « logdog/common/storage/bigtable/storage_test.go ('k') | logdog/common/storage/memory/memory_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698