You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Add a parameter to consume additional runtime variables for docker run (#113)
* Add a flag for function_concurrency and pass it down to docker run
* whitespaces
* Use a custom type for runtime env variables
* remove logging
* Fixing some errors
* addressing changes
* fixing an error
* fixing tabs
* address comments
* go fmt changes
Copy file name to clipboardExpand all lines: client/main.go
+13-10Lines changed: 13 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -18,20 +18,22 @@ package main
18
18
import (
19
19
"flag"
20
20
"log"
21
+
"strings"
21
22
)
22
23
23
24
var (
24
-
runCmd=flag.String("cmd", "", "string with command to run a Functions Framework server at localhost:8080. Ignored if -buildpacks=true.")
25
-
functionType=flag.String("type", "http", "type of function to validate (must be 'http', 'cloudevent', or 'legacyevent'")
26
-
validateMapping=flag.Bool("validate-mapping", true, "whether to validate mapping from legacy->cloud events and vice versa (as applicable)")
27
-
outputFile=flag.String("output-file", "function_output.json", "name of file output by function")
28
-
useBuildpacks=flag.Bool("buildpacks", true, "whether to use the current release of buildpacks to run the validation. If true, -cmd is ignored and --builder-* flags must be set.")
29
-
source=flag.String("builder-source", "", "function source directory to use in building. Required if -buildpacks=true")
30
-
target=flag.String("builder-target", "", "function target to use in building. Required if -buildpacks=true")
31
-
runtime=flag.String("builder-runtime", "", "runtime to use in building. Required if -buildpacks=true")
32
-
tag=flag.String("builder-tag", "latest", "builder image tag to use in building")
33
-
startDelay=flag.Uint("start-delay", 1, "Seconds to wait before sending HTTP request to command process")
25
+
runCmd=flag.String("cmd", "", "string with command to run a Functions Framework server at localhost:8080. Ignored if -buildpacks=true.")
26
+
functionType=flag.String("type", "http", "type of function to validate (must be 'http', 'cloudevent', or 'legacyevent'")
27
+
validateMapping=flag.Bool("validate-mapping", true, "whether to validate mapping from legacy->cloud events and vice versa (as applicable)")
28
+
outputFile=flag.String("output-file", "function_output.json", "name of file output by function")
29
+
useBuildpacks=flag.Bool("buildpacks", true, "whether to use the current release of buildpacks to run the validation. If true, -cmd is ignored and --builder-* flags must be set.")
30
+
source=flag.String("builder-source", "", "function source directory to use in building. Required if -buildpacks=true")
31
+
target=flag.String("builder-target", "", "function target to use in building. Required if -buildpacks=true")
32
+
runtime=flag.String("builder-runtime", "", "runtime to use in building. Required if -buildpacks=true")
33
+
tag=flag.String("builder-tag", "latest", "builder image tag to use in building")
34
+
startDelay=flag.Uint("start-delay", 1, "Seconds to wait before sending HTTP request to command process")
34
35
validateConcurrencyFlag=flag.Bool("validate-concurrency", false, "whether to validate concurrent requests can be handled, requires a function that sleeps for 1 second ")
36
+
envs=flag.String("envs", "", "a comma separated string of additional runtime environment variables")
0 commit comments