Configurable data processing in golang.
go get github.com/Focinfi/go-pipeline- Handler-*: References a existing Handler
- Builder-*: Builds a Handler with config
- Independent Handlers can process parallelly
type HandleRes struct {
Status HandleStatus `json:"status"`
Message string `json:"message"`
Meta map[string]interface{} `json:"meta"`
Data interface{} `json:"data"`
}
type Handler interface {
Handle(ctx context.Context, reqRes *HandleRes) (respRes *HandleRes, err error)
}-
Pipe- It is a
Handler - Instanced by config, contains a internal handler
- The internal handler can be built by a builder or refrenced by anther
Handler - Run the internal hanlder with timeout
- It is a
-
Parallel- It is a
Handler - Contains a list pipes of
Pipe - Parallelly run the every
Pipe.Handle
- It is a
-
Line- It is a
Handler - Contains a list of
Pipe - Sequently run the every
Pipe.Handle - Create a Line with JSON
- It is a