{"id":22683675,"url":"https://github.com/notedit/bsonrpc","last_synced_at":"2026-01-07T13:53:19.472Z","repository":{"id":2632051,"uuid":"3619776","full_name":"notedit/bsonrpc","owner":"notedit","description":"a rpc from http://code.google.com/p/vitess/","archived":false,"fork":false,"pushed_at":"2012-03-05T13:14:20.000Z","size":104,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-04T15:44:05.534Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":null,"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/notedit.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}},"created_at":"2012-03-04T17:39:16.000Z","updated_at":"2019-08-18T06:30:38.000Z","dependencies_parsed_at":"2022-08-29T18:41:10.160Z","dependency_job_id":null,"html_url":"https://github.com/notedit/bsonrpc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/notedit%2Fbsonrpc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/notedit%2Fbsonrpc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/notedit%2Fbsonrpc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/notedit%2Fbsonrpc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/notedit","download_url":"https://codeload.github.com/notedit/bsonrpc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246200301,"owners_count":20739563,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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-12-09T21:13:00.229Z","updated_at":"2026-01-07T13:53:19.432Z","avatar_url":"https://github.com/notedit.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# bsonrpc\n\na rpc from http://code.google.com/p/vitess/\n\n# go rpc server:\n\n```go\n\npackage main\n\nimport (\n    \"net/rpc\"\n    \"bsonrpc\"\n)\n\n\ntype Args struct {\n    A, B int \n}\n\ntype Reply struct {\n    C int \n}\n\ntype Arith int \n\n\nfunc (t *Arith) Add(args *Args, reply *Reply) error {\n    reply.C = args.A + args.B\n    return nil \n}\n\nfunc (t *Arith) Mul(args *Args, reply *Reply) error {\n    reply.C = args.A * args.B\n    return nil \n}\n\nfunc (t *Arith) NError(args *Args, reply *Reply) error {\n    return errors.New(\"normalerror\")\n}\n\nfunc main(){\n    rpc.Register(new(Arith))\n    bsonrpc.ListenAndServe(\"localhost:9999\")\n}\n\n```\n\n# python rpc client\n\n```python\n\nimport bsonrpc                                                                  \n\naddr = 'localhost:9999'\nuri = 'http://%s/_bson_rpc_' % addr\n\nclient = bsonrpc.BsonRpcClient(uri,5.0)\n\nreply = client.call('Arith.Add',{'A':7,'B':8})\n\nprint reply.sequence_id,reply.reply\n\nreply = client.call('Arith.Mul',{'A':4,'B':8})\n\nprint reply.sequence_id,reply.reply\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnotedit%2Fbsonrpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnotedit%2Fbsonrpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnotedit%2Fbsonrpc/lists"}