@@ -40,6 +40,10 @@ var fs = afero.NewOsFs()
40
40
// Properties holds all configurable properties of dfdaemon.
41
41
// The default path is '/etc/dragonfly/dfdaemon.yml'
42
42
// For examples:
43
+ // dfget_flags: ["--node","192.168.33.21","--verbose","--ip","192.168.33.23",
44
+ // "--port","15001","--expiretime","3m0s","--alivetime","5m0s",
45
+ // "-f","filterParam1&filterParam2"]
46
+ //
43
47
// registry_mirror:
44
48
// # url for the registry mirror
45
49
// remote: https://index.docker.io
@@ -88,18 +92,16 @@ type Properties struct {
88
92
CertPem string `yaml:"certpem" json:"certpem"`
89
93
KeyPem string `yaml:"keypem" json:"keypem"`
90
94
95
+ Verbose bool `yaml:"verbose" json:"verbose"`
96
+
97
+ MaxProcs int `yaml:"maxprocs" json:"maxprocs"`
98
+
91
99
// dfget config
100
+ DfgetFlags []string `yaml:"dfget_flags" json:"dfget_flags"`
92
101
SuperNodes []string `yaml:"supernodes" json:"supernodes"`
102
+ RateLimit string `yaml:"ratelimit" json:"ratelimit"`
93
103
DFRepo string `yaml:"localrepo" json:"localrepo"`
94
104
DFPath string `yaml:"dfpath" json:"dfpath"`
95
- RateLimit string `yaml:"ratelimit" json:"ratelimit"`
96
- URLFilter string `yaml:"urlfilter" json:"urlfilter"`
97
- CallSystem string `yaml:"callsystem" json:"callsystem"`
98
- Notbs bool `yaml:"notbs" json:"notbs"`
99
-
100
- Verbose bool `yaml:"verbose" json:"verbose"`
101
-
102
- MaxProcs int `yaml:"maxprocs" json:"maxprocs"`
103
105
}
104
106
105
107
// Validate validates the config
@@ -137,28 +139,30 @@ func (p *Properties) Validate() error {
137
139
138
140
// DFGetConfig returns config for dfget downloader
139
141
func (p * Properties ) DFGetConfig () DFGetConfig {
142
+ // init DfgetFlags
143
+ var dfgetFlags []string
144
+ dfgetFlags = append (dfgetFlags , p .DfgetFlags ... )
145
+ dfgetFlags = append (dfgetFlags , "--dfdaemon" )
146
+ if p .Verbose {
147
+ dfgetFlags = append (dfgetFlags , "--verbose" )
148
+ }
149
+
140
150
return DFGetConfig {
151
+ DfgetFlags : dfgetFlags ,
141
152
SuperNodes : p .SuperNodes ,
153
+ RateLimit : p .RateLimit ,
142
154
DFRepo : p .DFRepo ,
143
155
DFPath : p .DFPath ,
144
- RateLimit : p .RateLimit ,
145
- URLFilter : p .URLFilter ,
146
- CallSystem : p .CallSystem ,
147
- Notbs : p .Notbs ,
148
- Verbose : p .Verbose ,
149
156
}
150
157
}
151
158
152
159
// DFGetConfig configures how dfdaemon calls dfget
153
160
type DFGetConfig struct {
161
+ DfgetFlags []string `yaml:"dfget_flags"`
154
162
SuperNodes []string `yaml:"supernodes"`
163
+ RateLimit string `yaml:"ratelimit"`
155
164
DFRepo string `yaml:"localrepo"`
156
165
DFPath string `yaml:"dfpath"`
157
- RateLimit string `yaml:"ratelimit"`
158
- URLFilter string `yaml:"urlfilter"`
159
- CallSystem string `yaml:"callsystem"`
160
- Notbs bool `yaml:"notbs"`
161
- Verbose bool `yaml:"verbose"`
162
166
}
163
167
164
168
// RegistryMirror configures the mirror of the official docker registry
0 commit comments