Files
goodBaby/drivers/rainyun/runner.go
T

34 lines
782 B
Go
Raw Permalink Normal View History

2026-08-13 09:13:10 +08:00
package rainyun
import (
"context"
"log"
"github.com/ssdomei232/goodBaby/model"
)
// RainyunExecutor 雨云执行器
type RainyunWorkorderExecutor struct{}
func (e *RainyunWorkorderExecutor) GetType() string {
2026-08-30 16:03:32 +08:00
return RuleTypeWorkOrder
2026-08-13 09:13:10 +08:00
}
func (e *RainyunWorkorderExecutor) Execute(ctx context.Context, rule *model.Rule) error {
log.Printf("执行雨云工单规则: %s", rule.Name)
2026-08-13 14:46:43 +08:00
return SendRainyunWorkorderMsg(ctx, rule)
2026-08-13 09:13:10 +08:00
}
2026-08-13 14:50:08 +08:00
// RainyunRunAwayExecutor 雨云跑路执行器
type RainyunRunAwayExecutor struct{}
func (e *RainyunRunAwayExecutor) GetType() string {
2026-08-30 16:03:32 +08:00
return RuleTypeRunAway
2026-08-13 14:50:08 +08:00
}
func (e *RainyunRunAwayExecutor) Execute(ctx context.Context, rule *model.Rule) error {
log.Printf("执行雨云跑路规则: %s", rule.Name)
return RainyunRunAway(ctx, rule)
}