Pipe WorkFlow manager through watch folders.Designed for use with processing workflows involving movement between different folders for different stages.
go get github.com/ajithnn/go-flow
- Folder scanner package - Scans a given folder to look for stable files supports windows and linux.
- Stable is defined as files not being written.
- Returns the filepaths which can be process through outChannel
- Takes a white list of sub folders under the scan path and only scans those sub folders
- Passes the stable files to a process pipeline.
- Process pipeline needs to be defined as mentioned below.
- Configure pipes.json file, to include pipelines and their concurrency.
- Pipelines are defined as types inside components package. Define a type with a process method, process method defines the entire flow for the pipe.
- Pipeline capacity is the number of parallel pipes running through go routines.
- Pipeline type common - If one of the common pipes is at full capacity the others need to wait.
- Pipeline type separate - Each pipe will get dedicated capacity.
- Configure in components/asset.go file the TypeMap resgistry after defining a pipe.
go run scan_folder.go -logtostderr=true -v=2
Example: go run scan_folder.go -logtostderr=true -v=2 "./Inbox/" "Media,Meta"
- Tests to be written for scanner
- Use automatically created channels and allow parallel pipes to be used.