Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
gqcn committed Nov 28, 2024
1 parent 2c1230e commit a1fe96e
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions net/ghttp/internal/graceful/graceful.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ type ServerStatus = int

const (
// FreePortAddress marks the server listens using random free port.
FreePortAddress = ":0"
FreePortAddress = ":0"
// ServerStatusStopped indicates the server is stopped.
ServerStatusStopped ServerStatus = 0
// ServerStatusRunning indicates the server is running.
Expand All @@ -53,15 +53,15 @@ const (

// Server wraps the net/http.Server with graceful reload/restart feature.
type Server struct {
fd uintptr // File descriptor for passing to the child process when graceful reload.
address string // Listening address like ":80", ":8080".
httpServer *http.Server // Underlying http.Server.
rawListener net.Listener // Underlying net.Listener.
rawLnMu sync.RWMutex // Concurrent safety mutex for rawListener.
listener net.Listener // Wrapped net.Listener with TLS support if necessary.
isHttps bool // Whether server is running in HTTPS mode.
status *gtype.Int // Server status using gtype for concurrent safety.
config ServerConfig // Server configuration.
fd uintptr // File descriptor for passing to the child process when graceful reload.
address string // Listening address like ":80", ":8080".
httpServer *http.Server // Underlying http.Server.
rawListener net.Listener // Underlying net.Listener.
rawLnMu sync.RWMutex // Concurrent safety mutex for rawListener.
listener net.Listener // Wrapped net.Listener with TLS support if necessary.
isHttps bool // Whether server is running in HTTPS mode.
status *gtype.Int // Server status using gtype for concurrent safety.
config ServerConfig // Server configuration.
}

// ServerConfig is the graceful Server configuration manager.
Expand Down

0 comments on commit a1fe96e

Please sign in to comment.