mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Depend on iron-io/runner instead of iron-io/worker (#124)
This commit is contained in:
committed by
GitHub
parent
eed5422c59
commit
fbcec6bf40
@@ -4,7 +4,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/Sirupsen/logrus"
|
||||
titancommon "github.com/iron-io/worker/common"
|
||||
"github.com/iron-io/runner/common"
|
||||
"golang.org/x/net/context"
|
||||
)
|
||||
|
||||
@@ -24,7 +24,7 @@ func NewMetricLogger() *MetricLogger {
|
||||
type MetricLogger struct{}
|
||||
|
||||
func (l *MetricLogger) Log(ctx context.Context, metric map[string]interface{}) {
|
||||
log := titancommon.Logger(ctx)
|
||||
log := common.Logger(ctx)
|
||||
log.WithFields(logrus.Fields(metric)).Info()
|
||||
}
|
||||
|
||||
|
||||
@@ -15,12 +15,11 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
|
||||
"github.com/Sirupsen/logrus"
|
||||
"github.com/iron-io/worker/common"
|
||||
"github.com/iron-io/worker/runner/agent"
|
||||
"github.com/iron-io/worker/runner/drivers"
|
||||
driverscommon "github.com/iron-io/worker/runner/drivers"
|
||||
"github.com/iron-io/worker/runner/drivers/docker"
|
||||
"github.com/iron-io/worker/runner/drivers/mock"
|
||||
"github.com/iron-io/runner/common"
|
||||
"github.com/iron-io/runner/drivers"
|
||||
driverscommon "github.com/iron-io/runner/drivers"
|
||||
"github.com/iron-io/runner/drivers/docker"
|
||||
"github.com/iron-io/runner/drivers/mock"
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
@@ -157,7 +156,7 @@ func (r *Runner) Run(ctx context.Context, cfg *Config) (drivers.RunResult, error
|
||||
ctask := &containerTask{
|
||||
ctx: ctx,
|
||||
cfg: cfg,
|
||||
auth: &agent.ConfigAuth{},
|
||||
auth: &common.ConfigAuth{},
|
||||
canRun: make(chan bool),
|
||||
}
|
||||
|
||||
@@ -216,7 +215,7 @@ func (r *Runner) Run(ctx context.Context, cfg *Config) (drivers.RunResult, error
|
||||
func (r Runner) EnsureImageExists(ctx context.Context, cfg *Config) error {
|
||||
ctask := &containerTask{
|
||||
cfg: cfg,
|
||||
auth: &agent.ConfigAuth{},
|
||||
auth: &common.ConfigAuth{},
|
||||
}
|
||||
|
||||
err := r.driver.EnsureImageExists(ctx, ctask)
|
||||
|
||||
@@ -6,13 +6,13 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
|
||||
dockercli "github.com/fsouza/go-dockerclient"
|
||||
"github.com/iron-io/worker/runner/drivers"
|
||||
"github.com/iron-io/worker/runner/tasker"
|
||||
"github.com/iron-io/runner/common"
|
||||
"github.com/iron-io/runner/drivers"
|
||||
)
|
||||
|
||||
type containerTask struct {
|
||||
ctx context.Context
|
||||
auth tasker.Auther
|
||||
auth *common.ConfigAuth
|
||||
cfg *Config
|
||||
canRun chan bool
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user