dispatcher

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2023 License: BSD-3-Clause Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute()

Execute starts the server

func StartWorkerService

func StartWorkerService(data *ServiceData) error

StartWorkerService starts the event queue listener service to listen for manager and work events

Types

type DurationGetter

type DurationGetter interface {
	Get(v string) (time.Duration, error)
}

DurationGetter type provider duration for transcription ID

type Loader

type Loader interface {
	Read(name string) ([]byte, error)
}

Loader loads file by name

type ModelTypeGetter

type ModelTypeGetter interface {
	Get(v string) (string, error)
}

ModelTypeGetter type provides requires preload model type for transcription ID

type SelectionStrategy

type SelectionStrategy interface {
	FindBest(wrks []*worker, tsks map[string]*task, wi int) (*task, error)
}

SelectionStrategy type returns task work worker

type ServiceData

type ServiceData struct {
	RegistrationCh <-chan amqp.Delivery
	WorkCh         <-chan amqp.Delivery
	ResponseCh     <-chan amqp.Delivery
	// contains filtered or unexported fields
}

ServiceData keeps data required for service work

type StartTimeGetter

type StartTimeGetter interface {
	Get(tags []messages.Tag) (time.Time, error)
}

StartTimeGetter type provides start time for the transcription

Jump to

Keyboard shortcuts

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