app

package
v0.0.0-...-a53383b Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2023 License: Apache-2.0 Imports: 11 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Subscribe

func Subscribe(s AsyncMessageService, topics *TopicConfig) (err error)

Types

type AsyncMessageService

type AsyncMessageService interface {
	UpdateWuKongTask(*repository.WuKongResp) error
	CreateWuKongTask(*domain.WuKongRequest) error
}

func NewAsyncMessageService

func NewAsyncMessageService(
	repo repository.AsyncTask,
) AsyncMessageService

type AsyncService

type AsyncService interface {
	AsyncWuKong(taskType string, time int64) error
	AsyncWuKong4Img(taskType string, time int64) error
}

func NewAsyncService

func NewAsyncService(
	bigmodel bigmodel.BigModel,
	pool pool.Pool,
	repo repository.AsyncTask,
) AsyncService

type TaskService

type TaskService interface {
	GetWaitingTaskRank(types.Account, commondomain.Time, []string) (int, error)
	GetLastFinishedTask(types.Account, []string) (repository.WuKongResp, error)
}

func NewTaskService

func NewTaskService(
	repo repository.AsyncTask,
) TaskService

type TopicConfig

type TopicConfig struct {
	BigModelFinished     string `json:"bigmodel_finished"        required:"true"`
	InferenceStart       string `json:"inference_start"`
	InferenceError       string `json:"inference_error"`
	InferenceAsyncStart  string `json:"inference_async_start"`
	InferenceAsyncFinish string `json:"inference_async_finish"`
}

type WuKongCmd

type WuKongCmd struct {
	User  types.Account
	Desc  bigmodeldomain.WuKongPictureDesc
	Style string
}

Jump to

Keyboard shortcuts

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