shared container for job

This commit is contained in:
Casey Lee
2020-02-23 15:01:25 -08:00
parent 9179d8924d
commit 01876438c2
11 changed files with 445 additions and 531 deletions

View File

@@ -40,6 +40,15 @@ func NewInfoExecutor(format string, args ...interface{}) Executor {
}
}
// NewDebugExecutor is an executor that logs messages
func NewDebugExecutor(format string, args ...interface{}) Executor {
return func(ctx context.Context) error {
logger := Logger(ctx)
logger.Debugf(format, args...)
return nil
}
}
// NewPipelineExecutor creates a new executor from a series of other executors
func NewPipelineExecutor(executors ...Executor) Executor {
if len(executors) == 0 {