messages

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2024 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDownloadMessageAdapter

func NewDownloadMessageAdapter(
	topic string,
	cfg *DownloadProducerConfig,
	p commsg.Publisher,
	o commsg.OperateLogPublisher,
) *downloadMessageAdapter

func NewLikeMessageAdapter

func NewLikeMessageAdapter(topic string, cfg *LikeConfig, p commsg.Publisher) *likeMessageAdapter

func NewMessageSender

func NewMessageSender(topic *Topics, p common.Publisher) *sender

func NewResourceMessageAdapter

func NewResourceMessageAdapter(cfg *ResourceConfig,
	p commsg.Publisher, o commsg.OperateLogPublisher) *resourceMessageAdapter

func NewSignInMessageAdapter

func NewSignInMessageAdapter(cfg *SignInConfig, p common.Publisher) *signinMessageAdapter

func NewTrainingMessageAdapter

func NewTrainingMessageAdapter(cfg *TrainingConfig, p commsg.Publisher) *trainingMessageAdapter

func Subscribe

func Subscribe(
	ctx context.Context, handler interface{}, log *logrus.Entry,
	topic *Topics, subscriber common.Subscriber,
) (err error)

Types

type DownloadProducerConfig

type DownloadProducerConfig struct {
	ModelDownload   commsg.TopicConfig `json:"model_download" required:"true"`
	DatasetDownload commsg.TopicConfig `json:"dataset_download" required:"true"`
	ProjectDownload commsg.TopicConfig `json:"project_download" required:"true"`
}

type LikeConfig

type LikeConfig struct {
	ModelLiked   commsg.TopicConfig `json:"model_liked"   required:"true"`
	ProjectLiked commsg.TopicConfig `json:"project_liked" required:"true"`
	DatasetLiked commsg.TopicConfig `json:"dataset_liked" required:"true"`
}

type MsgOperateLog

type MsgOperateLog struct {
	When int64             `json:"when"`
	User string            `json:"user"`
	Type string            `json:"type"`
	Info map[string]string `json:"info,omitempty"`
}

type ReleasePodMsg

type ReleasePodMsg struct {
	PodId     string `json:"pod_id"`
	CloudType string `json:"cloud_type"`
}

type ResourceConfig

type ResourceConfig struct {
	RelatedResource string             `json:"related_resource" required:"true"`
	Fork            string             `json:"fork"             required:"true"`
	ProjectCreated  commsg.TopicConfig `json:"project_created" required:"true"`
	ModelCreated    commsg.TopicConfig `json:"model_created"           required:"true"`
	DatasetCreated  commsg.TopicConfig `json:"dataset_created"           required:"true"`
}

type SignInConfig

type SignInConfig struct {
	UserSignedIn common.TopicConfig `json:"user_signedin" required:"true"`
}

type Topics

type Topics struct {
	Like            string `json:"like"             required:"true"`
	Fork            string `json:"fork"             required:"true"`
	Download        string `json:"download"         required:"true"`
	Training        string `json:"training"         required:"true"`
	Finetune        string `json:"finetune"         required:"true"`
	Following       string `json:"following"        required:"true"`
	Inference       string `json:"inference"        required:"true"`
	Submission      string `json:"submission"       required:"true"`
	OperateLog      string `json:"operate_log"      required:"true"`
	RelatedResource string `json:"related_resource" required:"true"`
	Cloud           string `json:"cloud"            required:"true"`
	ReleaseCloud    string `json:"release_cloud"    required:"true"`
	Async           string `json:"async"            required:"true"`
	AICCFinetune    string `json:"aiccfinetune"     required:"true"`
}

type TrainingConfig

type TrainingConfig struct {
	TrainingCreated commsg.TopicConfig `json:"training_created" required:"true"`
}

Jump to

Keyboard shortcuts

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