File tree 2 files changed +15
-15
lines changed
2 files changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -49,23 +49,23 @@ type ThreadConfig struct {
49
49
50
50
// RpcConfig is a json-decoded configuration for running the gRPC server.
51
51
type RpcConfig struct {
52
- CaCert string
53
- ServerKey string
54
- ServerCert string
55
- ServerPort int
56
- ServerPcapPath string
57
- ServerPcapMaxSize int64
58
- ClientPcapChunkSize int64
59
- ClientPcapMaxSize int64
52
+ CaCert string
53
+ ServerKey string
54
+ ServerCert string
55
+ ServerPort int
56
+ ServerPcapPath string
57
+ ServerPcapMaxSize int64
58
+ ClientPcapChunkSize int64
59
+ ClientPcapMaxSize int64
60
60
}
61
61
62
62
// Config is a json-decoded configuration for running stenographer.
63
63
type Config struct {
64
- Rpc * RpcConfig
64
+ Rpc * RpcConfig
65
65
StenotypePath string
66
66
Threads []ThreadConfig
67
67
Interface string
68
- TestimonySocket string
68
+ TestimonySocket string
69
69
Flags []string
70
70
Port int
71
71
Host string // Location to listen.
@@ -111,9 +111,9 @@ func (c Config) Validate() error {
111
111
}
112
112
}
113
113
114
- if len (c .TestimonySocket ) > 0 && len (c .Interface ) > 0 {
115
- return fmt .Errorf ("Can't use both \" Interface\" and \" TestimonySocket\" options" )
116
- }
114
+ if len (c .TestimonySocket ) > 0 && len (c .Interface ) > 0 {
115
+ return fmt .Errorf ("Can't use both \" Interface\" and \" TestimonySocket\" options" )
116
+ }
117
117
118
118
if host := net .ParseIP (c .Host ); host == nil {
119
119
return fmt .Errorf ("invalid listening location %q in configuration" , c .Host )
Original file line number Diff line number Diff line change @@ -134,13 +134,13 @@ func New(c config.Config) (_ *Env, returnedErr error) {
134
134
135
135
// args is the set of command line arguments to pass to stentype.
136
136
func (d * Env ) args () []string {
137
- res := append (d .conf .Flags ,
137
+ res := append (d .conf .Flags ,
138
138
fmt .Sprintf ("--threads=%d" , len (d .conf .Threads )),
139
139
fmt .Sprintf ("--dir=%s" , d .Path ()))
140
140
141
141
if len (d .conf .Interface ) > 0 {
142
142
res = append (res , fmt .Sprintf ("--iface=%s" , d .conf .Interface ))
143
- }
143
+ }
144
144
if len (d .conf .TestimonySocket ) > 0 {
145
145
res = append (res , fmt .Sprintf ("--testimony=%s" , d .conf .TestimonySocket ))
146
146
}
You can’t perform that action at this time.
0 commit comments