{"id":21296254,"url":"https://github.com/co-rs/mco-rpc","last_synced_at":"2025-07-11T17:31:26.238Z","repository":{"id":57637317,"uuid":"441873844","full_name":"co-rs/mco-rpc","owner":"co-rs","description":"server/client remote call crate","archived":false,"fork":false,"pushed_at":"2023-12-08T11:37:19.000Z","size":73,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-08-09T21:13:46.954Z","etag":null,"topics":["async","mco","rpc"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/co-rs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-12-26T11:26:34.000Z","updated_at":"2022-03-27T06:06:37.000Z","dependencies_parsed_at":"2024-01-12T20:52:00.278Z","dependency_job_id":"62c1a031-16e0-42ba-92f1-8b7c66964ea5","html_url":"https://github.com/co-rs/mco-rpc","commit_stats":{"total_commits":121,"total_committers":1,"mean_commits":121.0,"dds":0.0,"last_synced_commit":"bde85f5161cc802c849cf9bb6d576fda9d894bf7"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/co-rs%2Fmco-rpc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/co-rs%2Fmco-rpc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/co-rs%2Fmco-rpc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/co-rs%2Fmco-rpc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/co-rs","download_url":"https://codeload.github.com/co-rs/mco-rpc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225743660,"owners_count":17517342,"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":["async","mco","rpc"],"created_at":"2024-11-21T14:25:15.823Z","updated_at":"2024-11-21T14:25:16.287Z","avatar_url":"https://github.com/co-rs.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mco-rpc\n\nmco-rpc\n\n* based on [mco](https://github.com/co-rs/mco), this is green-thread、coroutines crates\n* based T-L-V.for example:  ```[Tag][Length][Value]```\n* support json/bincode\n* support load balance(Round/Random/Hash/MinConnect)\n\n## how to use?\n\n```toml\nmco=\"0.1\"\nmco-rpc = \"0.1\"\n```\n\n* client\n\n```rust\nuse mco_rpc::client::Client;\nlet c = Client::dial(\"127.0.0.1:10000\").unwrap();\nlet resp:i32 = c.call(\"handle\", 1).unwrap();\nprintln!(\"resp=\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e :{}\", resp);\n```\n\n* server\n\n```rust\nuse mco_rpc::server::Server;\nuse mco::std::errors::Result;\n\nfn handle(req: i32) -\u003e Result\u003ci32\u003e {\n    Ok(req)\n}\nlet mut s = Server::default ();\ns.register_fn(\"handle\", handle);\ns.register_fn(\"handle_fn2\", |arg:i32| -\u003e Result\u003ci32\u003e{\nOk(1)\n});\ns.serve(\"0.0.0.0:10000\");\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fco-rs%2Fmco-rpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fco-rs%2Fmco-rpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fco-rs%2Fmco-rpc/lists"}