signals: enable hotreload on Windows via pipe#151
signals: enable hotreload on Windows via pipe#151
Conversation
There was a problem hiding this comment.
Pull request overview
Enables hot-reload signaling on Windows by replacing the previous no-op OnHUP behavior with a Windows named-pipe listener, and introduces a cross-platform SignalReload(pid) API (SIGHUP on POSIX, pipe connect on Windows).
Changes:
- Implement Windows
OnHUPreload signaling via\\.\pipe\dapr-reload-<PID>named pipe connections. - Add cross-platform helpers:
ReloadPipeName,listenPipe(platform-specific), andSignalReload(pid). - Add
github.com/Microsoft/go-winiodependency for Windows named pipe support.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| signals/signals_windows.go | Implements Windows reload handling by accepting named-pipe connections and emitting reload contexts. |
| signals/pipe_windows.go | Adds Windows named-pipe utilities and SignalReload implementation via go-winio. |
| signals/pipe_posix.go | Adds POSIX stubs for pipe helpers and implements SignalReload via SIGHUP. |
| go.mod | Adds github.com/Microsoft/go-winio v0.6.2 dependency. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Windows does not support SIGHUP, so OnHUP was previously a no-op. This replaces the no-op with a named pipe listener at `\\.\pipe\dapr-reload-<PID>`. Any connection to the pipe triggers a full Adds SignalReload(pid) as a cross-platform API for triggering reloads (sends SIGHUP on POSIX, connects to the named pipe on Windows). Signed-off-by: joshvanl <me@joshvanl.dev>
Signed-off-by: joshvanl <me@joshvanl.dev>
b553d81 to
a323de8
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: joshvanl <me@joshvanl.dev>
| @@ -0,0 +1,53 @@ | |||
| /* | |||
There was a problem hiding this comment.
This is what the _windows suffix of the filename is doing
Windows does not support SIGHUP, so OnHUP was previously a no-op. This replaces the no-op with a named pipe listener at
\\.\pipe\dapr-reload-<PID>. Any connection to the pipe triggers a fullAdds SignalReload(pid) as a cross-platform API for triggering reloads (sends SIGHUP on POSIX, connects to the named pipe on Windows).