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

Side by Side Diff: logdog/client/cmd/logdog_annotee/main.go

Issue 2626433004: Move "common/config" common types into cfgtypes. (Closed)
Patch Set: Created 3 years, 11 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 | « logdog/client/cmd/logdog_annotee/link.go ('k') | logdog/client/cmd/logdog_butler/main.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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" 15 "github.com/golang/protobuf/proto"
16 "github.com/luci/luci-go/common/clock/clockflag" 16 "github.com/luci/luci-go/common/clock/clockflag"
17 "github.com/luci/luci-go/common/config"
18 log "github.com/luci/luci-go/common/logging" 17 log "github.com/luci/luci-go/common/logging"
19 "github.com/luci/luci-go/common/logging/gologger" 18 "github.com/luci/luci-go/common/logging/gologger"
20 "github.com/luci/luci-go/common/proto/milo" 19 "github.com/luci/luci-go/common/proto/milo"
21 "github.com/luci/luci-go/common/runtime/profiling" 20 "github.com/luci/luci-go/common/runtime/profiling"
22 "github.com/luci/luci-go/logdog/client/annotee" 21 "github.com/luci/luci-go/logdog/client/annotee"
23 "github.com/luci/luci-go/logdog/client/annotee/executor" 22 "github.com/luci/luci-go/logdog/client/annotee/executor"
24 "github.com/luci/luci-go/logdog/client/bootstrapResult" 23 "github.com/luci/luci-go/logdog/client/bootstrapResult"
25 "github.com/luci/luci-go/logdog/client/butlerlib/bootstrap" 24 "github.com/luci/luci-go/logdog/client/butlerlib/bootstrap"
26 "github.com/luci/luci-go/logdog/client/butlerlib/streamclient" 25 "github.com/luci/luci-go/logdog/client/butlerlib/streamclient"
27 "github.com/luci/luci-go/logdog/client/butlerlib/streamproto" 26 "github.com/luci/luci-go/logdog/client/butlerlib/streamproto"
28 "github.com/luci/luci-go/logdog/common/types" 27 "github.com/luci/luci-go/logdog/common/types"
28 "github.com/luci/luci-go/luci_config/common/cfgtypes"
29 "golang.org/x/net/context" 29 "golang.org/x/net/context"
30 ) 30 )
31 31
32 const ( 32 const (
33 // configErrorReturnCode is returned when there is an error with Annotee 's 33 // configErrorReturnCode is returned when there is an error with Annotee 's
34 // command-line configuration. 34 // command-line configuration.
35 configErrorReturnCode = 2 35 configErrorReturnCode = 2
36 36
37 // runtimeErrorReturnCode is returned when the execution fails due to an 37 // runtimeErrorReturnCode is returned when the execution fails due to an
38 // Annotee runtime error. This is intended to help differentiate Annotee 38 // Annotee runtime error. This is intended to help differentiate Annotee
(...skipping 15 matching lines...) Expand all
54 type application struct { 54 type application struct {
55 context.Context 55 context.Context
56 56
57 resultPath string 57 resultPath string
58 jsonArgsPath string 58 jsonArgsPath string
59 butlerStreamServer string 59 butlerStreamServer string
60 tee teeFlag 60 tee teeFlag
61 printSummary bool 61 printSummary bool
62 testingDir string 62 testingDir string
63 annotationInterval clockflag.Duration 63 annotationInterval clockflag.Duration
64 » project config.ProjectName 64 » project cfgtypes.ProjectName
65 nameBase streamproto.StreamNameFlag 65 nameBase streamproto.StreamNameFlag
66 prefix streamproto.StreamNameFlag 66 prefix streamproto.StreamNameFlag
67 logdogHost string 67 logdogHost string
68 68
69 prof profiling.Profiler 69 prof profiling.Profiler
70 70
71 bootstrap *bootstrap.Bootstrap 71 bootstrap *bootstrap.Bootstrap
72 } 72 }
73 73
74 func (a *application) addToFlagSet(fs *flag.FlagSet) { 74 func (a *application) addToFlagSet(fs *flag.FlagSet) {
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 } 282 }
283 if err := a.maybeWriteResult(&br); err != nil { 283 if err := a.maybeWriteResult(&br); err != nil {
284 log.WithError(err).Warningf(a, "Failed to write bootstrap result .") 284 log.WithError(err).Warningf(a, "Failed to write bootstrap result .")
285 } 285 }
286 return e.ReturnCode() 286 return e.ReturnCode()
287 } 287 }
288 288
289 func main() { 289 func main() {
290 os.Exit(mainImpl(os.Args[1:])) 290 os.Exit(mainImpl(os.Args[1:]))
291 } 291 }
OLDNEW
« no previous file with comments | « logdog/client/cmd/logdog_annotee/link.go ('k') | logdog/client/cmd/logdog_butler/main.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698