{"id":19292412,"url":"https://github.com/foolin/gorpc","last_synced_at":"2026-06-17T21:32:21.121Z","repository":{"id":144200357,"uuid":"56200225","full_name":"foolin/gorpc","owner":"foolin","description":"gorpc is a lightweight RPC over HTTP services","archived":false,"fork":false,"pushed_at":"2016-12-28T04:03:55.000Z","size":14,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-20T06:45:41.814Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/foolin.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-04-14T02:12:01.000Z","updated_at":"2016-10-26T12:51:03.000Z","dependencies_parsed_at":"2023-06-17T08:30:38.362Z","dependency_job_id":null,"html_url":"https://github.com/foolin/gorpc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/foolin/gorpc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foolin%2Fgorpc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foolin%2Fgorpc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foolin%2Fgorpc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foolin%2Fgorpc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/foolin","download_url":"https://codeload.github.com/foolin/gorpc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foolin%2Fgorpc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34466928,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-17T02:00:05.408Z","response_time":127,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T22:30:43.789Z","updated_at":"2026-06-17T21:32:21.096Z","avatar_url":"https://github.com/foolin.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"gorpc is a lightweight RPC over HTTP services, use password sign for security, providing access to the exported methods of an object through HTTP requests.\n\nFeatures\n--------\n* Lightweight RPC\n* Http service\n* Password for security\n\nUsage\n---------\n\nInstall:\n\n    go get github.com/foolin/gorpc\n\n\nExample\n---------\n\n## Service\n\n```go\n\npackage rpcvo\n\ntype UserService struct {}\n\nfunc (this *UserService) Say(name *string, reply *string) error {\n\t*reply = \"Hello, \" + *name + \"!\"\n\treturn nil\n}\n\n\n```\n\n\n## Server\n```go\n\npackage main\nimport (\n\t\"net/http\"\n\t\"log\"\n\t\"github.com/foolin/gorpc\"\n\t\"github.com/foolin/gorpc/example/rpcvo\"\n)\n\n\nfunc main()  {\n\tlog.SetFlags(log.Lshortfile|log.LstdFlags)\n\n\tsecrect := \"1q2w3e\" //password\n\n\tserver := gorpc.NewServer(secrect)\n\n\t//=========== register rpc service =======//\n\t//Register batch\n\terr := server.Register(\n\t\tnew(rpcvo.UserService),\n\t)\n\tif err != nil {\n\t\tlog.Panicf(\"register error %v\", err)\n\t}\n\n\t//=========== create http server =======//\n\tmux := http.NewServeMux()\n\tmux.Handle(\"/rpc\", server)\n\tlog.Println(\"listen: 5080\")\n\tlog.Print(http.ListenAndServe(\":5080\", mux))\n}\n\n\n```\n\n\n## Client\n\n```go\n\npackage main\nimport (\n\t\"github.com/foolin/gorpc\"\n\t\"log\"\n\t\"github.com/foolin/gorpc/example/rpcvo\"\n)\n\n\nfunc main()  {\n\t//log.SetFlags(log.Lshortfile|log.LstdFlags)\n\n\tclient := gorpc.NewClient(\"http://127.0.0.1:5080/rpc\", \"1q2w3e\")\n\tvar err error\n\n\t//============= user service =============//\n\tvar sayReply string\n\terr = client.Call(\"UserService.Say\", \"Foolin\", \u0026sayReply)\n\tif err != nil {\n\t\tlog.Printf(\"UserService.Say error: %v\", err)\n\t}else{\n\t\tlog.Printf(\"UserService.Say result: %v\", sayReply)\n\t}\n\n}\n\n\n```\n\n## Result\n\n    2016/04/14 10:25:58 UserService.Say result: Hello, Foolin!\n    \n    \n    \n## About\n\nReference [gorilla/rpc](https://github.com/gorilla/rpc)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoolin%2Fgorpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffoolin%2Fgorpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoolin%2Fgorpc/lists"}