mirror of
https://github.com/aykhans/dodo.git
synced 2025-04-20 11:11:26 +00:00
🔨 Add methods to retrieve valid dodos count for requests and proxies
This commit is contained in:
parent
86d4e1ad34
commit
b659d29e50
@ -55,6 +55,14 @@ func (config *DodoConfig) Print() {
|
|||||||
t.Render()
|
t.Render()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (config *RequestConfig) GetValidDodosCountForRequests() int {
|
||||||
|
return min(config.DodosCount, config.RequestCount)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (config *RequestConfig) GetValidDodosCountForProxies() int {
|
||||||
|
return min(config.DodosCount, len(config.Proxies), MaxDodosCountForProxies)
|
||||||
|
}
|
||||||
|
|
||||||
type Config struct {
|
type Config struct {
|
||||||
Method string `json:"method" validate:"http_method"` // custom validations: http_method
|
Method string `json:"method" validate:"http_method"` // custom validations: http_method
|
||||||
URL string `json:"url" validate:"http_url,required"`
|
URL string `json:"url" validate:"http_url,required"`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user