| 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 syntax = "proto3"; | 5 syntax = "proto3"; |
| 6 | 6 |
| 7 import "google/protobuf/timestamp.proto"; |
| 8 |
| 7 package messages; | 9 package messages; |
| 8 | 10 |
| 9 // BlobWithSHA1 is a wrapper around a binary blob with SHA1 hash to verify | 11 // BlobWithSHA1 is a wrapper around a binary blob with SHA1 hash to verify |
| 10 // its integrity. | 12 // its integrity. |
| 11 message BlobWithSHA1 { | 13 message BlobWithSHA1 { |
| 12 bytes blob = 1; | 14 bytes blob = 1; |
| 13 bytes sha1 = 2; | 15 bytes sha1 = 2; |
| 14 } | 16 } |
| 15 | 17 |
| 16 // TagCache stores a mapping (package name, tag) -> instance ID to speed up | 18 // TagCache stores a mapping (package name, tag) -> instance ID to speed up |
| 17 // subsequence ResolveVersion calls when tags are used. | 19 // subsequence ResolveVersion calls when tags are used. |
| 18 message TagCache { | 20 message TagCache { |
| 19 message Entry { | 21 message Entry { |
| 20 string package = 1; | 22 string package = 1; |
| 21 string tag = 2; | 23 string tag = 2; |
| 22 string instance_id = 3; | 24 string instance_id = 3; |
| 23 } | 25 } |
| 24 | 26 |
| 25 // Capped list of entries, most recently resolved is last. | 27 // Capped list of entries, most recently resolved is last. |
| 26 repeated Entry entries = 1; | 28 repeated Entry entries = 1; |
| 27 } | 29 } |
| 30 |
| 31 // InstanceCache stores a list of instances in cache |
| 32 // and their last access time. |
| 33 message InstanceCache { |
| 34 // Entry stores info about an instance. |
| 35 message Entry { |
| 36 // LastAccess is last time this instance was retrieved from or put to the |
| 37 // cache. |
| 38 google.protobuf.Timestamp last_access = 2; |
| 39 } |
| 40 |
| 41 // Entries is a map of {instance id -> information about instance}. |
| 42 map<string, Entry> entries = 1; |
| 43 // LastSynced is timestamp when we synchronized Entries with actual |
| 44 // instance files. |
| 45 google.protobuf.Timestamp last_synced = 2; |
| 46 } |
| OLD | NEW |