Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrRedisQueueEmpty = errors.New("redis queue is empty")
)
Functions ¶
func RunAllWorkers ¶
RunClientWorkers start all the workers to fetch and push the satellite images to the appropriate S3 bucket.
Types ¶
type QueueElement ¶
type QueueElement struct {
// The longitude coordinate of the location.
Longitude float64 `json:"longitude"`
// The latitude coordinate of the location.
Latitude float64 `json:"latitude"`
// The Accident labels.
Labels map[string]string `json:"labels"`
}
A representation of an element retrieved from the Redis queue.
type SatelitteImage ¶
type SatelitteImage struct {
// The ID of the satellite image.
ID string
// The longitude coordinate of the location.
Longitude float64
// The latitude coordinate of the location.
Latitude float64
// The labels of the sattelite image.
Labels map[string]string
// The downloaded image as raw bytes.
Image []byte
}
A representation of an accident location.
type WorkerConf ¶
type WorkerConf struct {
// The ID of the worker.
ID string
// The ID of the current loading.
LoadingID string
// The configuration for the request to the Google API.
GoogleAPI *config.GoogleAPIConfig
// The configuration of the connection to the Redis server.
Redis *config.RedisConfig
// The configuration of the S3 Bucket connection.
S3 *config.S3Config
}
The configuration of a worker.
Click to show internal directories.
Click to hide internal directories.