42 lines
654 B
Go
42 lines
654 B
Go
package processing
|
|
|
|
import (
|
|
"context"
|
|
"log"
|
|
"m3u8-downloader/pkg/nas"
|
|
"sync"
|
|
)
|
|
|
|
type ProcessingService struct {
|
|
config *ProcessConfig
|
|
nas *nas.NASConfig
|
|
}
|
|
|
|
func NewProcessingService(config *ProcessConfig, nas *nas.NASConfig) *ProcessingService {
|
|
return &ProcessingService{
|
|
config: config,
|
|
nas: nas,
|
|
}
|
|
}
|
|
|
|
func (ps *ProcessingService) Start(ctx context.Context) error {
|
|
if !ps.config.Enabled {
|
|
log.Println("Processing service disabled")
|
|
return nil
|
|
}
|
|
|
|
var wg sync.WaitGroup
|
|
|
|
wg.Add(1)
|
|
go func() {
|
|
defer wg.Done()
|
|
}()
|
|
wg.Wait()
|
|
|
|
return nil
|
|
}
|
|
|
|
func (ps *ProcessingService) ProcessEvent(eventName string) error {
|
|
return nil
|
|
}
|