Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CommonFuncV1 ¶
type CommonFuncV1 func(args ...interface{}) interface{}
type ConsumerFuncV1 ¶
type Pipe ¶
type Pipe struct { InChan InChan Producer ProducerFunc Count int //多少个消费者 }
func (*Pipe) PipeDo ¶
func (this *Pipe) PipeDo(p ProducerFunc, c CommonFunc, options ...optionFunc) OutChan
type PipeLineCommonChan ¶
type PipeLineCommonChan chan interface{}
流水线
func PipeLineDo ¶
func PipeLineDo(producer PipeLineProducer, userFns ...PipeLineFuncWorker) PipeLineCommonChan
流水线入口 todo 每一个处理步骤可以设置处理的worker数量
type PipeLineFuncWorker ¶
type PipeLineFuncWorker func(chanItem interface{}) interface{}
return nil表示这个数据不再进行处理
type PipeV1 ¶
type PipeV1 struct { Producer ProducerFuncV1 Consumer ConsumerFuncV1 Count int //多少个消费者 }
func (*PipeV1) SetConsumer ¶
func (this *PipeV1) SetConsumer(c ConsumerFuncV1, count int)
func (*PipeV1) SetProducer ¶
func (this *PipeV1) SetProducer(p ProducerFuncV1)
func (*PipeV1) SetProducerNew ¶
func (this *PipeV1) SetProducerNew(p CommonFuncV1) interface{}
type ProducerFunc ¶
type ProducerFunc func(in InChan)
type ProducerFuncV1 ¶
type ProducerFuncV1 func(args ...interface{}) InChanV1
Click to show internal directories.
Click to hide internal directories.