1 Star 0 Fork 0

庞飞/multiapp

Create your Gitee Account
Explore and code with more than 13.5 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
work.go 774 Bytes
Copy Edit Raw Blame History
庞飞 authored 2023-10-03 10:28 +08:00 . 合并主框架
package work
import (
"github.com/golang/protobuf/proto"
"gitee.com/pangxianfei/multiapp/kernel/zone"
)
type Job struct {
param proto.Message
delay zone.Duration
}
func (j *Job) Name() string {
panic("need implements")
}
func (j *Job) Handle(paramPtr proto.Message) error {
panic("need implements")
}
func (j *Job) SetParam(paramPtr proto.Message) {
j.param = paramPtr
}
func (j *Job) paramData() proto.Message {
return j.param
}
func (j *Job) ParamProto() proto.Message {
panic("need implements")
}
// Retries default retry 3 times
func (j *Job) Retries() uint32 {
return 3
}
// SetDelay default no delay
func (j *Job) SetDelay(delay zone.Duration) {
j.delay = delay
}
// Delay default no delay
func (j *Job) Delay() zone.Duration {
return j.delay
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/pangxianfei/multiapp.git
git@gitee.com:pangxianfei/multiapp.git
pangxianfei
multiapp
multiapp
v1.2.3

Search