Registry / networking / keegancsmith-rpc

keegancsmith-rpc

JSON →
library1.3.0gogounverified

A fork of the standard library net/rpc package that adds context.Context support for cancellation propagation.

go get github.com/keegancsmith/rpc
INSTALL
IMPORT
SIG · KEEGANCSMITH-RPC
K
keegancsmith-rpc
networkinggov1.3.0
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/keegancsmith/rpc

Makes an RPC call with context support.

package main import ( "context" "fmt" "github.com/keegancsmith/rpc" ) func main() { client, _ := rpc.DialHTTP("tcp", "localhost:1234") var reply int err := client.Call(context.Background(), "Arith.Multiply", 6, &reply) if err != nil { fmt.Println(err) } else { fmt.Printf("Result: %d\n", reply) } }
Debug
Known issues
gotchaThis package is a fork of the frozen net/rpc and may not be compatible with future Go versions.
fix
Consider using alternative RPC frameworks like gRPC or net/rpc with manual context handling.
affects: all
Upgrade
Version history
1.3.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
keegancsmith-rpc — go get keegancsmith-rpc · libregistry