2020-03-16 22:24:37 +01:00
|
|
|
package structures
|
|
|
|
|
|
|
|
|
|
type Response struct {
|
|
|
|
|
Url string
|
|
|
|
|
Content []byte
|
|
|
|
|
Err error
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Request struct {
|
|
|
|
|
Url string
|
|
|
|
|
Response chan Response
|
|
|
|
|
}
|
2020-03-18 20:42:43 +01:00
|
|
|
|
|
|
|
|
type WorkerDescription struct {
|
|
|
|
|
Ip string
|
|
|
|
|
Req chan Request
|
|
|
|
|
}
|
2020-05-07 10:02:49 +02:00
|
|
|
|
|
|
|
|
type ProxyServer struct {
|
|
|
|
|
Type string
|
|
|
|
|
Address string
|
|
|
|
|
}
|
2020-05-08 07:50:27 +02:00
|
|
|
|
2020-05-08 10:41:49 +02:00
|
|
|
type WebServerConfig struct {
|
|
|
|
|
Address string
|
|
|
|
|
APIKey string
|
|
|
|
|
Timeout int // In seconds
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type WorkerServerConfig struct {
|
|
|
|
|
Address string
|
|
|
|
|
WorkersCount int
|
|
|
|
|
RequestMessagePrefix string
|
|
|
|
|
}
|
|
|
|
|
|
2020-05-08 07:50:27 +02:00
|
|
|
type ClientConfig struct {
|
|
|
|
|
ConnectionsCount int
|
|
|
|
|
ConnectionTimeout int // In seconds
|
|
|
|
|
WorkerServerAddress string
|
|
|
|
|
RequestMessagePrefix string
|
|
|
|
|
ProxyListBaseURL string
|
|
|
|
|
}
|