title: How to monitor a network interface ( go-lang)
body: <p>I need to monitor the local address(IP) of a network interface(i.e. whenever it's changed or the interface is unplugged do some stuff) and I'm wondering what's the best way to do that. Currently I'm using <a href="http://golang.org/pkg/net/#InterfaceByName" rel="nofollow">InterfaceByName</a> to get and verify/match the interface details in an infinite loop. I monitor several interfaces so I'm wondering if it's a bad thing or if I should use some delays etc. It would be great if the OS would send a signal whenever the interface is updated but I'm not aware of a such thing. </p>