Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StartWorkerService ¶
func StartWorkerService(ctx context.Context, data *ServiceData) (chan struct{}, error)
StartWorkerService starts the event queue listener service to listen for events returns channel for tracking if all jobs are finished
Types ¶
type DB ¶
type DB interface { LoadRequest(ctx context.Context, id string) (*persistence.ReqData, error) LoadStatus(ctx context.Context, id string) (*persistence.Status, error) LoadWorkData(ctx context.Context, id string) (*persistence.WorkData, error) InsertWorkData(context.Context, *persistence.WorkData) error UpdateStatus(context.Context, *persistence.Status) error UpdateWorkData(context.Context, *persistence.WorkData) error }
DB provides persistnce functionality
type Filer ¶
type Filer interface { LoadFile(ctx context.Context, fileName string) (io.ReadSeekCloser, error) SaveFile(ctx context.Context, name string, r io.Reader, fileSize int64) error }
Filer retrieves files
type MsgSender ¶
type MsgSender interface {
SendMessage(context.Context, amessages.Message, *messages.Options) error
}
MsgSender provides send msg functionality
type ServiceData ¶
type ServiceData struct { GueClient *gue.Client WorkerCount int // ASR worker WorkerOtherCount int // for handling statuses, etc MsgSender MsgSender DB DB Filer Filer TranscriberPr TranscriberProvider UsageRestorer UsageRestorer Testing bool RetryDelay time.Duration }
ServiceData keeps data required for service work
type TranscriberProvider ¶
type TranscriberProvider interface {
Get(key string, allowOther bool) (tapi.Transcriber, string, error)
}
TranscriberProvider provides transcriber
Click to show internal directories.
Click to hide internal directories.