Documentation
¶
Index ¶
- Variables
- func CleanupDownloads(maxSizeMB int64)
- func GetRedisClient() *redis.Client
- func InitRedis(address, password string, db int)
- func KeepWebSocketAlive(ws *websocket.Conn, id string)
- func MonitorStatusAndNotify(ws *websocket.Conn, id, initialStatus string, ctx *gin.Context) <-chan struct{}
- func ProcessDownload(url, format, id string)
- func SetProcessingStatus(id string)
- type StatusInfo
- type WebSocketMessage
Constants ¶
This section is empty.
Variables ¶
View Source
var Ctx = context.Background()
View Source
var RedisClient *redis.Client
Functions ¶
func CleanupDownloads ¶
func CleanupDownloads(maxSizeMB int64)
func GetRedisClient ¶ added in v1.0.2
func KeepWebSocketAlive ¶
func MonitorStatusAndNotify ¶
func ProcessDownload ¶
func ProcessDownload(url, format, id string)
func SetProcessingStatus ¶
func SetProcessingStatus(id string)
Types ¶
type StatusInfo ¶
func GetDownloadStatus ¶
func GetDownloadStatus(id string) StatusInfo
type WebSocketMessage ¶
type WebSocketMessage struct {
Status string `json:"status"`
ID string `json:"id"`
Message string `json:"message,omitempty"`
}
func CreateWebSocketMessages ¶
func CreateWebSocketMessages(status, id string) WebSocketMessage
Click to show internal directories.
Click to hide internal directories.