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

Side by Side Diff: appengine/logdog/coordinator/endpoints/logs/util.go

Issue 1863973002: LogDog: Update to archival V2. (Closed) Base URL: https://github.com/luci/luci-go@grpcutil-errors
Patch Set: Code review comments, use Pub/Sub, archival staging, quality of life. Created 4 years, 8 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 Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package logs 5 package logs
6 6
7 import ( 7 import (
8 "github.com/luci/luci-go/appengine/logdog/coordinator" 8 "github.com/luci/luci-go/appengine/logdog/coordinator"
9 "github.com/luci/luci-go/common/api/logdog_coordinator/logs/v1" 9 "github.com/luci/luci-go/common/api/logdog_coordinator/logs/v1"
10 "github.com/luci/luci-go/common/proto/google" 10 "github.com/luci/luci-go/common/proto/google"
11 ) 11 )
12 12
13 func loadLogStreamState(ls *coordinator.LogStream) *logdog.LogStreamState { 13 func loadLogStreamState(ls *coordinator.LogStream) *logdog.LogStreamState {
14 lss := logdog.LogStreamState{ 14 lss := logdog.LogStreamState{
15 ProtoVersion: ls.ProtoVersion, 15 ProtoVersion: ls.ProtoVersion,
16 Created: google.NewTimestamp(ls.Created), 16 Created: google.NewTimestamp(ls.Created),
17 Updated: google.NewTimestamp(ls.Updated),
18 TerminalIndex: ls.TerminalIndex, 17 TerminalIndex: ls.TerminalIndex,
19 Purged: ls.Purged, 18 Purged: ls.Purged,
20 } 19 }
20
21 if ls.Archived() { 21 if ls.Archived() {
22 lss.Archive = &logdog.LogStreamState_ArchiveInfo{ 22 lss.Archive = &logdog.LogStreamState_ArchiveInfo{
23 » » » IndexUrl: ls.ArchiveIndexURL, 23 » » » IndexUrl: ls.ArchiveIndexURL,
24 » » » StreamUrl: ls.ArchiveStreamURL, 24 » » » StreamUrl: ls.ArchiveStreamURL,
25 » » » DataUrl: ls.ArchiveDataURL, 25 » » » DataUrl: ls.ArchiveDataURL,
26 » » » Whole: ls.ArchiveWhole, 26 » » » Complete: ls.ArchiveComplete(),
27 » » » LogEntryCount: ls.ArchiveLogEntryCount,
27 } 28 }
28 } 29 }
29 30
30 return &lss 31 return &lss
31 } 32 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698