fn: allow specified docker networks in functions (#982)

* fn: allow specified docker networks in functions

If FN_DOCKER_NETWORK is specified with a list of
networks, then agent driver picks the least used
network to place functions on.

* add mutex comment
This commit is contained in:
Tolga Ceylan
2018-05-09 12:24:15 -07:00
committed by GitHub
parent 1c00782a6c
commit 0f50537150
5 changed files with 124 additions and 23 deletions

View File

@@ -137,6 +137,7 @@ func createAgent(da DataAccess) Agent {
// TODO: Create drivers.New(runnerConfig)
driver := docker.NewDocker(drivers.Config{
DockerNetworks: cfg.DockerNetworks,
ServerVersion: cfg.MinDockerVersion,
PreForkPoolSize: cfg.PreForkPoolSize,
PreForkImage: cfg.PreForkImage,