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

Side by Side Diff: client/cmd/luci_machine_tokend/main.go

Issue 1953753003: token-server: Bump luci_machine_tokend version. (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-go@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 // Command luci_machine_tokend runs on all machines via cron. 5 // Command luci_machine_tokend runs on all machines via cron.
6 // 6 //
7 // It wakes up each ~10 min, checks whether it needs to refresh existing machine 7 // It wakes up each ~10 min, checks whether it needs to refresh existing machine
8 // token, and refreshes it if necessary. 8 // token, and refreshes it if necessary.
9 // 9 //
10 // It also dumps information about its run into a status file (as JSON), that 10 // It also dumps information about its run into a status file (as JSON), that
(...skipping 22 matching lines...) Expand all
33 "github.com/luci/luci-go/common/tsmon" 33 "github.com/luci/luci-go/common/tsmon"
34 34
35 "github.com/luci/luci-go/client/tokenclient" 35 "github.com/luci/luci-go/client/tokenclient"
36 "github.com/luci/luci-go/common/api/tokenserver" 36 "github.com/luci/luci-go/common/api/tokenserver"
37 "github.com/luci/luci-go/common/api/tokenserver/minter/v1" 37 "github.com/luci/luci-go/common/api/tokenserver/minter/v1"
38 ) 38 )
39 39
40 // Version identifies the major revision of the tokend code. 40 // Version identifies the major revision of the tokend code.
41 // 41 //
42 // It is put in the status file (and subsequently reported to monitoring). 42 // It is put in the status file (and subsequently reported to monitoring).
43 const Version = "1.0" 43 const Version = "1.1"
44 44
45 // commandLine contains all command line flags. 45 // commandLine contains all command line flags.
46 // 46 //
47 // See registerFlags() for description of each individual flag. 47 // See registerFlags() for description of each individual flag.
48 type commandLine struct { 48 type commandLine struct {
49 PrivateKeyPath string 49 PrivateKeyPath string
50 CertificatePath string 50 CertificatePath string
51 Backend string 51 Backend string
52 TokenFile string 52 TokenFile string
53 StatusFile string 53 StatusFile string
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 sort.Strings(keys) 303 sort.Strings(keys)
304 h := sha1.New() 304 h := sha1.New()
305 for _, k := range keys { 305 for _, k := range keys {
306 v := inputs[k] 306 v := inputs[k]
307 fmt.Fprintf(h, "%s\n%d\n", k, len(v)) 307 fmt.Fprintf(h, "%s\n%d\n", k, len(v))
308 h.Write(v) 308 h.Write(v)
309 } 309 }
310 blob := h.Sum(nil) 310 blob := h.Sum(nil)
311 return hex.EncodeToString(blob[:]) 311 return hex.EncodeToString(blob[:])
312 } 312 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698