proxy.golang.org : github.com/dradtke/gob-rpc
Package gob provides a gob codec for Gorilla RPC over HTTP. At time of writing, the Gorilla project only offers one codec for its RPC over HTTP package, namely JSON. JSON is nice and all, but for Go programs talking to Go programs, gob is superior because it takes advantage of the common type system, not to mention the simple truth that a binary format takes up less space on the wire. The primary use case for this package is web applications consisting of a Go server on the backend and GopherJS on the frontend. If those two components are in place, then there's no real reason to choose JSON over gob. It's even possible to have both enabled simultaneously, thanks to Gorilla RPC's use of the Content-Type header to specify codec. Note that net/rpc over Websockets is another way to enable gob-RPC, but due to the way that net/rpc service methods are defined, it's impossible to get any context about the client during an RPC method call unless it's provided explicitly each time. Gorilla RPC signatures add an *http.Request parameter that can be examined to get this type of information.
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/dradtke/gob-rpc
License: Apache-2.0
Latest release: almost 9 years ago
First release: almost 9 years ago
Namespace: github.com/dradtke
Stars: 0 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 19 days ago