{"id":41066988,"url":"https://github.com/totoleo/yar","last_synced_at":"2026-01-22T12:42:24.274Z","repository":{"id":57493117,"uuid":"183836302","full_name":"totoleo/yar","owner":"totoleo","description":"Yet Another yaR client to go","archived":false,"fork":false,"pushed_at":"2019-05-01T01:56:49.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-06-20T08:17:19.322Z","etag":null,"topics":["client","go","rpc","yar"],"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/totoleo.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":"2019-04-28T00:57:58.000Z","updated_at":"2019-05-01T01:54:46.000Z","dependencies_parsed_at":"2022-08-28T11:51:15.574Z","dependency_job_id":null,"html_url":"https://github.com/totoleo/yar","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/totoleo/yar","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/totoleo%2Fyar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/totoleo%2Fyar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/totoleo%2Fyar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/totoleo%2Fyar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/totoleo","download_url":"https://codeload.github.com/totoleo/yar/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/totoleo%2Fyar/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28663002,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T01:17:37.254Z","status":"online","status_checked_at":"2026-01-22T02:00:07.137Z","response_time":144,"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":["client","go","rpc","yar"],"created_at":"2026-01-22T12:42:20.786Z","updated_at":"2026-01-22T12:42:24.267Z","avatar_url":"https://github.com/totoleo.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"#### Yar: Yet Another yaR client to go\n\n-----\n[Yar](https://github.com/totoleo/yar) 是一个[YAR，一个轻量级的跨语言RPC框架](https://github.com/laruence/yar)的客户端实现\n\n#### 特性\n\n1. 支持http客户端\n2. 支持动态参数列表，但不支持默认值\n\n-----\n\n#### Example Client\n\n```go\npackage main\n\nimport (\n    \"context\"\n\t\"fmt\"\n\t\n\t\"github.com/totoleo/yar\"\n\t\"github.com/totoleo/yar/client\"\n)\n\nfunc main() {\n    \n    //初始化一个客户端。\n    //目前仅支持http,https 的Yar服务端\n\tc, err := client.NewClient(\"http://127.0.0.1:8080\")\n    \n\tif err != nil {\n\t\tfmt.Println(\"error\", err)\n\t}\n\n\t//这是默认值\n    //定义Yar的服务端方法返回值\n\tvar ret interface{}\n\n\tcallErr := c.Call(context.TODO(),\"echo\", \u0026ret)\n    \n    //错误判断\n\tif callErr != nil {\n\t\tfmt.Println(\"error\", callErr)\n\t}\n    \n\tfmt.Println(\"data\", ret)\n}\n\n```\n\n感谢：\n[weixinhost/yar.go](https://github.com/weixinhost/yar.go)\n[gyf19/yar-go](https://github.com/gyf19/yar-go)\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftotoleo%2Fyar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftotoleo%2Fyar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftotoleo%2Fyar/lists"}