Registry / networking / gorilla-rpc

gorilla-rpc

JSON →
library1.2.1gogounverified

A foundation for RPC over HTTP services, providing access to exported methods of an object through HTTP requests with support for multiple codecs.

go get github.com/gorilla/rpc
INSTALL
IMPORT
SIG · GORILLA-RPC
G
gorilla-rpc
networkinggov1.2.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

rpc
github.com/gorilla/rpc

Set up a JSON RPC server with a HelloService

package main import ( "net/http" "github.com/gorilla/rpc" "github.com/gorilla/rpc/json" ) type HelloService struct{} func (h *HelloService) Say(r *http.Request, args *struct{Name string}, reply *struct{Message string}) error { reply.Message = "Hello, " + args.Name return nil } func main() { s := rpc.NewServer() s.RegisterCodec(json.NewCodec(), "application/json") s.RegisterService(new(HelloService), "") http.Handle("/rpc", s) http.ListenAndServe(":8080", nil) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.2.1latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
gorilla-rpc — go get gorilla-rpc · libregistry