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 /* | 5 /* |
6 Package cipd implements client side of Chrome Infra Package Deployer. | 6 Package cipd implements client side of Chrome Infra Package Deployer. |
7 | 7 |
8 TODO: write more. | 8 TODO: write more. |
9 | 9 |
10 Binary package file format (in free form representation): | 10 Binary package file format (in free form representation): |
(...skipping 26 matching lines...) Expand all Loading... |
37 import ( | 37 import ( |
38 "bufio" | 38 "bufio" |
39 "errors" | 39 "errors" |
40 "fmt" | 40 "fmt" |
41 "io" | 41 "io" |
42 "net/http" | 42 "net/http" |
43 "os" | 43 "os" |
44 "strings" | 44 "strings" |
45 "time" | 45 "time" |
46 | 46 |
47 » "infra/libs/logging" | 47 » "github.com/luci/luci-go/common/logging" |
48 | 48 |
49 "infra/tools/cipd/common" | 49 "infra/tools/cipd/common" |
50 "infra/tools/cipd/local" | 50 "infra/tools/cipd/local" |
51 ) | 51 ) |
52 | 52 |
53 // PackageACLChangeAction defines a flavor of PackageACLChange. | 53 // PackageACLChangeAction defines a flavor of PackageACLChange. |
54 type PackageACLChangeAction string | 54 type PackageACLChangeAction string |
55 | 55 |
56 const ( | 56 const ( |
57 // GrantRole is used in PackageACLChange to request a role to be granted
. | 57 // GrantRole is used in PackageACLChange to request a role to be granted
. |
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
645 } | 645 } |
646 | 646 |
647 // buildInstanceIDMap builds mapping {package name -> instance ID}. | 647 // buildInstanceIDMap builds mapping {package name -> instance ID}. |
648 func buildInstanceIDMap(pins []common.Pin) map[string]string { | 648 func buildInstanceIDMap(pins []common.Pin) map[string]string { |
649 out := map[string]string{} | 649 out := map[string]string{} |
650 for _, p := range pins { | 650 for _, p := range pins { |
651 out[p.PackageName] = p.InstanceID | 651 out[p.PackageName] = p.InstanceID |
652 } | 652 } |
653 return out | 653 return out |
654 } | 654 } |
OLD | NEW |