Problem
The overload middleware's most aggressive stage needs to temporarily stop accepting new connections. The engine.AcceptController interface exists and is implemented by epoll/io_uring engines, but it's not exposed through the public Server API.
Unblocks
Change
// server.go
func (s *Server) PauseAccept() error {
ac, ok := s.engine.(engine.AcceptController)
if !ok {
return ErrAcceptControlNotSupported
}
return ac.PauseAccept()
}
func (s *Server) ResumeAccept() error {
ac, ok := s.engine.(engine.AcceptController)
if !ok {
return ErrAcceptControlNotSupported
}
return ac.ResumeAccept()
}
// errors.go
var ErrAcceptControlNotSupported = errors.New("celeris: engine does not support accept control")
Performance
Pure method forwarding with type assertion. Only called during overload events. Zero cost on hot path.
Files
Problem
The overload middleware's most aggressive stage needs to temporarily stop accepting new connections. The
engine.AcceptControllerinterface exists and is implemented by epoll/io_uring engines, but it's not exposed through the publicServerAPI.Unblocks
Change
Performance
Pure method forwarding with type assertion. Only called during overload events. Zero cost on hot path.
Files
server.goerrors.go