Files
SamWaf/innerbean/server_runtime.go
T
2026-06-18 13:54:22 +08:00

21 lines
603 B
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package innerbean
import (
"net/http"
"github.com/quic-go/quic-go/http3"
)
type ServerRunTime struct {
//tcp http https
ServerType string
Port int
Status int // 0 是启动完成 ,1 是新增,2 是编辑 3,是删除
Svr *http.Server
H3 *http3.Server
// Conns 当前该端口打开的连接数(原子计数)。由 http.Server.ConnState 维护:
// StateNew +1 ;StateClosed / StateHijacked -1 。用于升级排空时观测"还剩多少连接"。
// 为指针以便随 ServerRunTime 值在 SafeServerMap 间复制时仍共享同一计数。
Conns *int64
}