functions: hot containers (#332)

* functions: modify datastore to accomodate hot containers support

* functions: protocol between functions and hot containers

* functions: add hot containers clockwork

* fn: add hot containers support
This commit is contained in:
C Cirello
2016-11-28 18:45:35 +01:00
committed by Pedro Nasser
parent d0429c3dfd
commit ac0044f7d9
31 changed files with 809 additions and 170 deletions

View File

@@ -9,6 +9,7 @@ import (
"time"
"github.com/iron-io/functions/api/models"
"github.com/iron-io/functions/api/runner/task"
)
func TestRunnerHello(t *testing.T) {
@@ -31,7 +32,7 @@ func TestRunnerHello(t *testing.T) {
{&models.Route{Image: "iron/hello"}, `{"name": "test"}`, "success", "Hello test!", ""},
} {
var stdout, stderr bytes.Buffer
cfg := &Config{
cfg := &task.Config{
ID: fmt.Sprintf("hello-%d-%d", i, time.Now().Unix()),
Image: test.route.Image,
Timeout: 5 * time.Second,
@@ -84,7 +85,7 @@ func TestRunnerError(t *testing.T) {
{&models.Route{Image: "iron/error"}, `{"name": "test"}`, "error", "", "RuntimeError"},
} {
var stdout, stderr bytes.Buffer
cfg := &Config{
cfg := &task.Config{
ID: fmt.Sprintf("err-%d-%d", i, time.Now().Unix()),
Image: test.route.Image,
Timeout: 5 * time.Second,