Documentation ¶
Index ¶
- func LinesIn(r io.Reader) (o chan string)
- func LinesInProcessing(cmd *exec.Cmd) (o chan string, err error)
- func NewConcurrentLineProcessor(handler func(string) error, concurrency uint, strategy ErrStrategy) func(io.Reader)
- func NewLineProcessor(handler func(string) error, strategy ErrStrategy) func(io.Reader)
- type ErrStrategy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LinesInProcessing ¶
LinesInProcessing Command
func NewConcurrentLineProcessor ¶
func NewConcurrentLineProcessor(handler func(string) error, concurrency uint, strategy ErrStrategy) func(io.Reader)
NewConcurrentLineProcessor from handler and strategy
func NewLineProcessor ¶
func NewLineProcessor(handler func(string) error, strategy ErrStrategy) func(io.Reader)
NewLineProcessor from handler and strategy
Types ¶
type ErrStrategy ¶
type ErrStrategy int
ErrStrategy when encounting error
const ( // IgnoreWhenError (no logging and continue) IgnoreWhenError ErrStrategy = iota // LogWhenError (continue) LogWhenError // StopWhenError (not continue) StopWhenError )
Click to show internal directories.
Click to hide internal directories.