You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
538 B
32 lines
538 B
1 month ago
|
package et_print
|
||
|
|
||
|
import (
|
||
|
"gitea.anxinyun.cn/container/common_models"
|
||
|
"log"
|
||
|
"node/stages"
|
||
|
)
|
||
|
|
||
|
type PrintHandler struct {
|
||
|
stage *stages.Stage
|
||
|
}
|
||
|
|
||
|
func (the *PrintHandler) GetStage() stages.Stage {
|
||
|
return *the.stage
|
||
|
}
|
||
|
|
||
|
func NewPrintHandler() *PrintHandler {
|
||
|
the := &PrintHandler{
|
||
|
stage: stages.NewStage("测试打印"),
|
||
|
}
|
||
|
|
||
|
the.stage.AddProcess(the.print)
|
||
|
return the
|
||
|
}
|
||
|
|
||
|
func (the *PrintHandler) print(p *common_models.ProcessData) *common_models.ProcessData {
|
||
|
|
||
|
log.Printf("处理设备[%s]数据", p.DeviceData.Name)
|
||
|
|
||
|
return p
|
||
|
}
|