You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ntool-biz/nmodbus/pipeline.go

16 lines
336 B
Go

1 year ago
package nmodbus
import (
"git.noahlan.cn/noahlan/nnet"
"git.noahlan.cn/noahlan/nnet/connection"
)
func withPipeline() nnet.RunOption {
return func(ngin *nnet.Engine) {
ngin.Pipeline().Inbound().PushFront(func(conn *connection.Connection, v interface{}) error {
conn.SetStatus(connection.StatusWorking)
return nil
})
}
}