github.com/iron-io/functions@v0.0.0-20180820112432-d59d7d1c40b2/api/runner/task/task.go (about) 1 package task 2 3 import ( 4 "context" 5 "io" 6 "time" 7 8 "github.com/iron-io/runner/drivers" 9 ) 10 11 type Config struct { 12 ID string 13 Path string 14 Image string 15 Timeout time.Duration 16 IdleTimeout time.Duration 17 AppName string 18 Memory uint64 19 Env map[string]string 20 Format string 21 MaxConcurrency int 22 23 Stdin io.Reader 24 Stdout io.Writer 25 Stderr io.Writer 26 } 27 28 // Request stores the task to be executed by the common concurrency stream, 29 // whatever type the ask actually is, either sync or async. It holds in itself 30 // the channel to return its response to its caller. 31 type Request struct { 32 Ctx context.Context 33 Config *Config 34 Response chan Response 35 } 36 37 // Response holds the response metainformation of a Request 38 type Response struct { 39 Result drivers.RunResult 40 Err error 41 }