Use common httpserver across fission (#2409)

* Defining httpserver package to capture httpserver shutdown and
introduces uniform running of http server across codebase.
* Add unit tests for httpserver

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
Sanket Sudake
2022-04-14 11:35:58 +05:30
committed by GitHub
parent b638a6d047
commit 8442e21621
18 changed files with 139 additions and 93 deletions
+2 -3
View File
@@ -200,7 +200,8 @@ Options:
logger := loggerfactory.GetLogger()
defer exitWithSync(logger)
profile.ProfileIfEnabled(logger)
ctx := signals.SetupSignalHandlerWithContext(logger)
profile.ProfileIfEnabled(ctx, logger)
version := fmt.Sprintf("Fission Bundle Version: %v", info.BuildInfo().String())
arguments, err := docopt.ParseArgs(usage, nil, version)
@@ -209,8 +210,6 @@ Options:
return
}
ctx := signals.SetupSignalHandlerWithContext(logger)
openTracingEnabled := tracing.TracingEnabled(logger)
if openTracingEnabled {
err = tracing.RegisterTraceExporter(logger, os.Getenv("TRACE_JAEGER_COLLECTOR_ENDPOINT"), getServiceName(arguments))