synthesize

package
v0.3.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 19, 2023 License: BSD-3-Clause Imports: 11 Imported by: 0

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 MsgSender

type MsgSender interface {
	Send(msg amessages.Message, queue, replyQueue string) error
}

MsgSender sends messages

type ServiceData

type ServiceData struct {
	MsgSender       MsgSender
	InformMsgSender MsgSender
	StatusSaver     StatusSaver
	UploadCh        <-chan amqp.Delivery
	SplitCh         <-chan amqp.Delivery
	SynthesizeCh    <-chan amqp.Delivery
	JoinCh          <-chan amqp.Delivery
	RestoreUsageCh  <-chan amqp.Delivery

	Splitter      Worker
	Synthesizer   Worker
	Joiner        Worker
	UsageRestorer Worker

	StopCtx context.Context
}

ServiceData keeps data required for service work

type StatusSaver

type StatusSaver interface {
	Save(ID string, status, err string) error
}

StatusSaver persists data to DB

type Worker

type Worker interface {
	Do(context.Context, *messages.TTSMessage) error
}

Worker wraps some work functionality

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL