| OLD | NEW |
| 1 // Copyright 2015 The LUCI Authors. All rights reserved. | 1 // Copyright 2015 The LUCI Authors. All rights reserved. |
| 2 // Use of this source code is governed under the Apache License, Version 2.0 | 2 // Use of this source code is governed under the Apache License, Version 2.0 |
| 3 // that can be found in the LICENSE file. | 3 // that can be found in the LICENSE file. |
| 4 | 4 |
| 5 package main | 5 package main |
| 6 | 6 |
| 7 import ( | 7 import ( |
| 8 "encoding/json" | 8 "encoding/json" |
| 9 "errors" | 9 "errors" |
| 10 "flag" | 10 "flag" |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 Client: client, | 239 Client: client, |
| 240 MetadataUpdateInterval: time.Duration(a.annotationInterv
al), | 240 MetadataUpdateInterval: time.Duration(a.annotationInterv
al), |
| 241 CloseSteps: true, | 241 CloseSteps: true, |
| 242 TeeAnnotations: a.tee.annotations, | 242 TeeAnnotations: a.tee.annotations, |
| 243 TeeText: a.tee.text, | 243 TeeText: a.tee.text, |
| 244 }, | 244 }, |
| 245 | 245 |
| 246 Stdin: os.Stdin, | 246 Stdin: os.Stdin, |
| 247 } | 247 } |
| 248 | 248 |
| 249 » linkGen := &coordinatorLinkGenerator{ | 249 » linkGen := &annotee.CoordinatorLinkGenerator{ |
| 250 » » host: a.logdogHost, | 250 » » Host: a.logdogHost, |
| 251 » » project: a.project, | 251 » » Project: a.project, |
| 252 » » prefix: prefix, | 252 » » Prefix: prefix, |
| 253 } | 253 } |
| 254 » if linkGen.canGenerateLinks() { | 254 » if linkGen.CanGenerateLinks() { |
| 255 e.Options.LinkGenerator = linkGen | 255 e.Options.LinkGenerator = linkGen |
| 256 } | 256 } |
| 257 | 257 |
| 258 if a.tee.enabled() { | 258 if a.tee.enabled() { |
| 259 e.TeeStdout = os.Stdout | 259 e.TeeStdout = os.Stdout |
| 260 e.TeeStderr = os.Stderr | 260 e.TeeStderr = os.Stderr |
| 261 } | 261 } |
| 262 if err := e.Run(a, args); err != nil { | 262 if err := e.Run(a, args); err != nil { |
| 263 log.Fields{ | 263 log.Fields{ |
| 264 log.ErrorKey: err, | 264 log.ErrorKey: err, |
| (...skipping 24 matching lines...) Expand all Loading... |
| 289 if err := a.maybeWriteResult(&br); err != nil { | 289 if err := a.maybeWriteResult(&br); err != nil { |
| 290 log.WithError(err).Warningf(a, "Failed to write bootstrap result
.") | 290 log.WithError(err).Warningf(a, "Failed to write bootstrap result
.") |
| 291 } | 291 } |
| 292 return e.ReturnCode() | 292 return e.ReturnCode() |
| 293 } | 293 } |
| 294 | 294 |
| 295 func main() { | 295 func main() { |
| 296 mathrand.SeedRandomly() | 296 mathrand.SeedRandomly() |
| 297 os.Exit(mainImpl(os.Args[1:])) | 297 os.Exit(mainImpl(os.Args[1:])) |
| 298 } | 298 } |
| OLD | NEW |