event

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2024 License: MIT Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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