fix(comment): Add a few missing comments on func
This commit is contained in:
@@ -18,11 +18,14 @@ const defaultShutdownTimeout = 10 * time.Second
|
||||
|
||||
type cleanupFunc func() error
|
||||
|
||||
// ExecuteServerParams are the parameters expected in the ExecuteServer function.
|
||||
type ExecuteServerParams struct {
|
||||
Cleanup cleanupFunc
|
||||
ShutdownTimeout *time.Duration
|
||||
}
|
||||
|
||||
// ExecuteServer will launche a http.Server and handle the "exit" signals and gracefully stop the server
|
||||
// and call the cleanup function.
|
||||
func ExecuteServer(ctx context.Context, srv *http.Server, params *ExecuteServerParams) error {
|
||||
|
||||
log := commonctx.GetLogger(ctx)
|
||||
|
Reference in New Issue
Block a user