cloudflare / pingora

A library for building fast, reliable and evolvable network services.
Apache License 2.0
20.3k stars 1.1k forks source link

feat: Implement a shutdown signal listener function #153

Open gengteng opened 3 months ago

gengteng commented 3 months ago

Hi,

In this PR, I've tackled two TODO items related to our server's signal handling for shutdown and upgrade processes:

  1. Centralized Signal Listening: Introduced a function to listen for shutdown signals, streamlining previous scattered logic.
  2. Enhanced Graceful Upgrades: Ensured rapid shutdown signals are considered during upgrades, bolstering the process's reliability.

These changes aim to clarify and refine our approach, potentially aligning with the original design intentions. I'm curious to hear if this matches our design goals or if there's a preferred direction.

Thanks.