kafkaintegration

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: 12 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 StartServer

func StartServer(data *ServiceData) error

StartServer init the service to listen to kafka messages and pass it to transcrption

Types

type DB

type DB interface {
	GetAudio(kafkaID string) (*kafkaapi.DBEntry, error)
	SaveResult(data *kafkaapi.DBResultEntry) error
}

DB loads writes data to AFT Storage

type Filer

type Filer interface {
	Find(kafkaID string) (*kafkaapi.KafkaTrMap, error)
	SetWorking(krIds *kafkaapi.KafkaTrMap) error
	Delete(kafkaID string) error
}

Filer helps persist working IDs

type KafkaReader

type KafkaReader interface {
	Get() (*kafkaapi.Msg, error)
	Commit(*kafkaapi.Msg) error
	Close()
}

KafkaReader provides messages from Kafka

type KafkaWriter

type KafkaWriter interface {
	Write(msg *kafkaapi.ResponseMsg) error
}

KafkaWriter writes msgs to kafka

type ServiceData

type ServiceData struct {
	// contains filtered or unexported fields
}

ServiceData keeps data required for service work

type Transcriber

type Transcriber interface {
	Upload(audio *kafkaapi.UploadData) (string, error)
	GetStatus(ID string) (*kafkaapi.Status, error)
	GetResult(ID string) (*kafkaapi.Result, error)
	Delete(ID string) error
}

Transcriber comunicates with transcription service

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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