cloudflare / tableflip

Graceful process restarts in Go
BSD 3-Clause "New" or "Revised" License
2.88k stars 147 forks source link

Embed Fds struct in Upgrader #27

Closed lmb closed 5 years ago

lmb commented 5 years ago

Fds is a member of Upgrader, which makes it hard to stub out Upgrader with an interface for testing. Embed Fds in Upgrader to fix this. Users can then write code like

ln, err := upg.Listen("foo", "bar")

and use a single interface. Existing code will continue to work.