aboutsummaryrefslogtreecommitdiff
path: root/lib/http/server_options.go
diff options
context:
space:
mode:
Diffstat (limited to 'lib/http/server_options.go')
-rw-r--r--lib/http/server_options.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/http/server_options.go b/lib/http/server_options.go
index 8e168885..61fcff33 100644
--- a/lib/http/server_options.go
+++ b/lib/http/server_options.go
@@ -9,6 +9,7 @@ import (
"net"
"net/http"
"strings"
+ "time"
"git.sr.ht/~shulhan/pakakeh.go/lib/memfs"
)
@@ -63,6 +64,11 @@ type ServerOptions struct {
// The options for Cross-Origin Resource Sharing.
CORS CORSOptions
+ // ShutdownIdleDuration define the duration where the server will
+ // automatically stop accepting new connection and then shutting down
+ // the server.
+ ShutdownIdleDuration time.Duration
+
// If true, server generate index.html automatically if its not
// exist in the directory.
// The index.html contains the list of files inside the requested