rpcgen

command
v1.3.111 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2026 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Overview

Package main internal/rpcgen/main.go c4-vis-cli

Command rpcgen writes reflection-free gobrpc handlers for a net/rpc receiver. TinyGo's reflect has no Value.Call or Type.Method, so the same generated handlers serve both the Go and the TinyGo build.

Usage:

go run ./internal/rpcgen -type T=registerT[,U=registerU] -o x_rpc.go

It reads the package in -dir (default ".") as each build in targets sees it, fails unless they all agree on the methods of *T that net/rpc would register, and writes func registerT(s *rpc.Server, name string, r *T) error, which calls s.HandleCall(name+".Method", ...) for each method. The argument is decoded on the read loop and the method runs in its own goroutine, as with net/rpc.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL