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

Unified Diff: logdog/common/storage/bigtable/cache.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
Index: logdog/common/storage/bigtable/cache.go
diff --git a/logdog/common/storage/bigtable/cache.go b/logdog/common/storage/bigtable/cache.go
index 666471a5037bc9b7cb3aee34c76802b9151c7689..c86adaac127962cf56743fa7703569a0ec2ad05c 100644
--- a/logdog/common/storage/bigtable/cache.go
+++ b/logdog/common/storage/bigtable/cache.go
@@ -9,10 +9,10 @@ import (
"encoding/binary"
"time"
- "github.com/luci/luci-go/common/config"
log "github.com/luci/luci-go/common/logging"
"github.com/luci/luci-go/logdog/common/storage/caching"
"github.com/luci/luci-go/logdog/common/types"
+ "github.com/luci/luci-go/luci_config/common/cfgtypes"
"golang.org/x/net/context"
)
@@ -30,7 +30,7 @@ const lastTailIndexCacheDuration = 1 * time.Hour
//
// If there was an error, or if the item was not cached, 0 (first index) will be
// returned.
-func getLastTailIndex(c context.Context, cache caching.Cache, project config.ProjectName, path types.StreamPath) int64 {
+func getLastTailIndex(c context.Context, cache caching.Cache, project cfgtypes.ProjectName, path types.StreamPath) int64 {
itm := mkLastTailItem(project, path)
cache.Get(c, itm)
if itm.Data == nil {
@@ -53,7 +53,7 @@ func getLastTailIndex(c context.Context, cache caching.Cache, project config.Pro
return v
}
-func putLastTailIndex(c context.Context, cache caching.Cache, project config.ProjectName, path types.StreamPath, v int64) {
+func putLastTailIndex(c context.Context, cache caching.Cache, project cfgtypes.ProjectName, path types.StreamPath, v int64) {
buf := make([]byte, binary.MaxVarintLen64)
buf = buf[:binary.PutVarint(buf, v)]
@@ -62,7 +62,7 @@ func putLastTailIndex(c context.Context, cache caching.Cache, project config.Pro
cache.Put(c, lastTailIndexCacheDuration, itm)
}
-func mkLastTailItem(project config.ProjectName, path types.StreamPath) *caching.Item {
+func mkLastTailItem(project cfgtypes.ProjectName, path types.StreamPath) *caching.Item {
return &caching.Item{
Schema: cacheSchema,
Type: "bt_tail_idx",
« no previous file with comments | « logdog/common/storage/archive/storage.go ('k') | logdog/common/storage/bigtable/logdog_bigtable_test/main.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698