app.go/condflow.go/cron.go/event_stream.go/executor.go/gobridge.go/grpc.go/job.go/mcp.go/mqtt.go/res_virtual_table.go/ws.go/controller.go/support/service.go 精简掉搬到 framework-v2 internal/handler 里的公共默认实现,只保留接口定义。
17 lines
263 B
Go
17 lines
263 B
Go
package contracts
|
|
|
|
import (
|
|
"git.fsdpf.net/go/req"
|
|
"github.com/samber/do/v2"
|
|
)
|
|
|
|
type Controller interface {
|
|
// 初始化
|
|
Init() error
|
|
// 获取 Container
|
|
Container() do.Injector
|
|
// 派遣一个任务
|
|
Dispatch(job string, payload any, u req.User) error
|
|
}
|
|
|