Documentation ¶
Index ¶
- type Flow
- func (f *Flow) AddInFlow(key string, in Reader)
- func (f *Flow) AddOutFlow(key string, out Writer)
- func (f *Flow) AddProcessFlow(key string, process Processor)
- func (f *Flow) GetStatus() FlowStatus
- func (f *Flow) IsRunning() bool
- func (f *Flow) IsStartable() bool
- func (f *Flow) Restart() error
- func (f *Flow) Serve(workersCount int, in, out string, processors []string) error
- func (f *Flow) SetInFlow(in map[string]Reader)
- func (f *Flow) SetOutFlow(out map[string]Writer)
- func (f *Flow) SetProcessFlow(process map[string]Processor)
- func (f *Flow) Stop() error
- func (f *Flow) WithChanBuffer(chanBuffer uint16) *Flow
- func (f *Flow) WithError(err string) *Flow
- func (f *Flow) WithWaitToKill(waitToKill uint16) *Flow
- type FlowStatus
- type Processor
- type Reader
- type Status
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Flow ¶
type Flow struct { In map[string]Reader Out map[string]Writer Process map[string]Processor // contains filtered or unexported fields }
Flow is the abstract flow worker to operate input, output and process
func (*Flow) AddProcessFlow ¶
AddProcessFlow process adder
func (*Flow) GetStatus ¶ added in v0.4.1
func (f *Flow) GetStatus() FlowStatus
func (*Flow) IsStartable ¶ added in v0.6.6
func (*Flow) Serve ¶
Serve flow in concurrent mode returned error also save in description of the flow status so we can not check it at the moment
func (*Flow) SetProcessFlow ¶
SetProcessFlow process setter
func (*Flow) Stop ¶ added in v0.3.0
Stop stops reading important that Reader should be tollerant to Cancel if it is not reading
func (*Flow) WithChanBuffer ¶ added in v0.3.1
func (*Flow) WithWaitToKill ¶ added in v0.6.0
type FlowStatus ¶ added in v0.6.0
type Processor ¶
type Processor interface {
ProcessMessage(wg *sync.WaitGroup, inChan, outChan chan map[string]string, goroutineNum int)
}
Processor data in flow
type Reader ¶
type Reader interface { ReadDataToChan() (inChan chan map[string]string) Cancel() GetReadStatus() (countRead, countMax uint64) }
Reader input data to flow
Click to show internal directories.
Click to hide internal directories.