job

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: AGPL-3.0, Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

View Source
const (
	MinSupportedRecorderVersion    = "0.6.0"
	MinSupportedTranscriberVersion = "0.1.0"
	RecordingJobPrefix             = "calls-recorder"
	TranscribingJobPrefix          = "calls-transcriber"
	ImageRegistryDefault           = "mattermost"

	InputDataSiteURLKey = "site_url"
)

Variables

This section is empty.

Functions

func RunnerIsValid

func RunnerIsValid(runner, registry string) error

Types

type Config

type Config struct {
	Type           Type      `json:"type"`
	MaxDurationSec int64     `json:"max_duration_sec"`
	Runner         string    `json:"runner"`
	InputData      InputData `json:"input_data,omitempty"`
}

func (Config) IsValid

func (c Config) IsValid(registry string) error

type InputData added in v0.8.0

type InputData map[string]any

func (InputData) GetSiteURL added in v0.8.0

func (d InputData) GetSiteURL() string

func (InputData) SetSiteURL added in v0.8.0

func (d InputData) SetSiteURL(siteURL string)

func (InputData) ToEnv added in v0.8.0

func (d InputData) ToEnv() []string

type Job

type Job struct {
	Config
	ID         string         `json:"id"`
	StartAt    int64          `json:"start_at"`
	StopAt     int64          `json:"stop_at,omitempty"`
	OutputData map[string]any `json:"output_data,omitempty"`
}

type ServiceConfig

type ServiceConfig struct {
	Runners []string
}

func (ServiceConfig) IsValid

func (c ServiceConfig) IsValid(registry string) error

type StopCb

type StopCb func(job Job, success bool) error

type Type

type Type string
const (
	TypeRecording    Type = "recording"
	TypeTranscribing Type = "transcribing"
)

Jump to

Keyboard shortcuts

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