event

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const TaskWorkerEventName = "task_worker_events"

Variables

This section is empty.

Functions

This section is empty.

Types

type EworkRunnerExecuteEvent

type EworkRunnerExecuteEvent struct {
	TaskId    int64                  `json:"task_id"`
	Language  string                 `json:"language"`
	Code      string                 `json:"code"`
	Args      map[string]interface{} `json:"args"`
	Variables string                 `json:"variables"`
}

type Status

type Status uint8
const (
	// RUNNING 启用
	RUNNING Status = 1
	// STOPPING 停止
	STOPPING Status = 2
)

func (Status) ToUint8

func (s Status) ToUint8() uint8

type TaskWorkerEventProducer

type TaskWorkerEventProducer interface {
	Produce(ctx context.Context, topic string, evt EworkRunnerExecuteEvent) error
	AddProducer(topic string) error
	DelProducer(topic string) error
}

func NewTaskRunnerEventProducer

func NewTaskRunnerEventProducer(q mq.MQ) (TaskWorkerEventProducer, error)

type WorkerEvent

type WorkerEvent struct {
	Name   string `json:"name"`
	Desc   string `json:"desc"`
	Topic  string `json:"topic"`
	Status Status `json:"status"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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