| 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" |
| 11 "fmt" | 11 "fmt" |
| 12 "os" | 12 "os" |
| 13 "time" | 13 "time" |
| 14 | 14 |
| 15 "github.com/golang/protobuf/proto" | |
| 16 "github.com/luci/luci-go/common/clock/clockflag" | 15 "github.com/luci/luci-go/common/clock/clockflag" |
| 17 log "github.com/luci/luci-go/common/logging" | 16 log "github.com/luci/luci-go/common/logging" |
| 18 "github.com/luci/luci-go/common/logging/gologger" | 17 "github.com/luci/luci-go/common/logging/gologger" |
| 19 "github.com/luci/luci-go/common/proto/milo" | 18 "github.com/luci/luci-go/common/proto/milo" |
| 20 "github.com/luci/luci-go/common/runtime/profiling" | 19 "github.com/luci/luci-go/common/runtime/profiling" |
| 21 "github.com/luci/luci-go/logdog/client/annotee" | 20 "github.com/luci/luci-go/logdog/client/annotee" |
| 22 "github.com/luci/luci-go/logdog/client/annotee/executor" | 21 "github.com/luci/luci-go/logdog/client/annotee/executor" |
| 23 "github.com/luci/luci-go/logdog/client/bootstrapResult" | 22 "github.com/luci/luci-go/logdog/client/bootstrapResult" |
| 24 "github.com/luci/luci-go/logdog/client/butlerlib/bootstrap" | 23 "github.com/luci/luci-go/logdog/client/butlerlib/bootstrap" |
| 25 "github.com/luci/luci-go/logdog/client/butlerlib/streamclient" | 24 "github.com/luci/luci-go/logdog/client/butlerlib/streamclient" |
| 26 "github.com/luci/luci-go/logdog/client/butlerlib/streamproto" | 25 "github.com/luci/luci-go/logdog/client/butlerlib/streamproto" |
| 27 "github.com/luci/luci-go/logdog/common/types" | 26 "github.com/luci/luci-go/logdog/common/types" |
| 28 "github.com/luci/luci-go/luci_config/common/cfgtypes" | 27 "github.com/luci/luci-go/luci_config/common/cfgtypes" |
| 28 |
| 29 "github.com/golang/protobuf/proto" |
| 29 "golang.org/x/net/context" | 30 "golang.org/x/net/context" |
| 30 ) | 31 ) |
| 31 | 32 |
| 32 const ( | 33 const ( |
| 33 // configErrorReturnCode is returned when there is an error with Annotee
's | 34 // configErrorReturnCode is returned when there is an error with Annotee
's |
| 34 // command-line configuration. | 35 // command-line configuration. |
| 35 configErrorReturnCode = 2 | 36 configErrorReturnCode = 2 |
| 36 | 37 |
| 37 // runtimeErrorReturnCode is returned when the execution fails due to an | 38 // runtimeErrorReturnCode is returned when the execution fails due to an |
| 38 // Annotee runtime error. This is intended to help differentiate Annotee | 39 // Annotee runtime error. This is intended to help differentiate Annotee |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 } | 283 } |
| 283 if err := a.maybeWriteResult(&br); err != nil { | 284 if err := a.maybeWriteResult(&br); err != nil { |
| 284 log.WithError(err).Warningf(a, "Failed to write bootstrap result
.") | 285 log.WithError(err).Warningf(a, "Failed to write bootstrap result
.") |
| 285 } | 286 } |
| 286 return e.ReturnCode() | 287 return e.ReturnCode() |
| 287 } | 288 } |
| 288 | 289 |
| 289 func main() { | 290 func main() { |
| 290 os.Exit(mainImpl(os.Args[1:])) | 291 os.Exit(mainImpl(os.Args[1:])) |
| 291 } | 292 } |
| OLD | NEW |