Add statsclient - pure Go implementation for stats API
[govpp.git] / vendor / github.com / ftrvxmtrx / fd / README.md
1 # fd
2
3 Package fd provides a simple API to pass file descriptors
4 between different OS processes.
5
6 It can be useful if you want to inherit network connections
7 from another process without closing them.
8
9 Example scenario:
10
11  * Running server receives a "let's upgrade" message
12  * Server opens a Unix domain socket for the "upgrade"
13  * Server starts a new copy of itself and passes Unix domain
14    socket name
15  * New copy starts reading data from the socket
16  * Server sends its state over the socket, also sending the number
17    of network connections to inherit, then it sends those connections
18    using fd.Put()
19  * New server copy reads the state and inherits connections using fd.Get(),
20    checks that everything is OK and writes an "OK" message to the socket
21  * Server receives "OK" message and kills itself
22
23 ## Documentation
24
25 [fd on godoc.org](http://godoc.org/github.com/ftrvxmtrx/fd)