| OLD | NEW |
| 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 } |
| OLD | NEW |