gops
gops copied to clipboard
Another take on HTTP mode
This PR adds communication over HTTP, so it would be possible to use existing server to serve gops traffic. All previous modes are preserved as-is; so both local and rawsocket-remote modes are still there.
I've refactored client code a bit so that both socket and HTTP modes would be possible to use; now there's a Client iface implemented by ClientTCP and ClientHTTP that is passed to every gops command's function instead of raw TCPAddr.
To use it run gops like this: gops pprof-cpu http://localhost:port/handler