{"id":20055468,"url":"https://github.com/huntlabs/hunt-service","last_synced_at":"2026-03-05T12:32:13.013Z","repository":{"id":96142129,"uuid":"175155431","full_name":"huntlabs/hunt-service","owner":"huntlabs","description":"Distributed RPC framework (micro-service) for DLang based on gRPC and neton.","archived":false,"fork":false,"pushed_at":"2019-06-25T13:04:26.000Z","size":1387,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-25T11:50:42.843Z","etag":null,"topics":["distributed","micro-service","rpc","rpc-client","rpc-server","rpc-service"],"latest_commit_sha":null,"homepage":"","language":"D","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/huntlabs.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":"2019-03-12T07:14:38.000Z","updated_at":"2019-10-30T03:51:29.000Z","dependencies_parsed_at":"2023-05-05T17:31:50.057Z","dependency_job_id":null,"html_url":"https://github.com/huntlabs/hunt-service","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/huntlabs/hunt-service","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huntlabs%2Fhunt-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huntlabs%2Fhunt-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huntlabs%2Fhunt-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huntlabs%2Fhunt-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/huntlabs","download_url":"https://codeload.github.com/huntlabs/hunt-service/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huntlabs%2Fhunt-service/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30124449,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T11:11:57.947Z","status":"ssl_error","status_checked_at":"2026-03-05T11:11:29.001Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["distributed","micro-service","rpc","rpc-client","rpc-server","rpc-service"],"created_at":"2024-11-13T12:48:06.296Z","updated_at":"2026-03-05T12:32:12.993Z","avatar_url":"https://github.com/huntlabs.png","language":"D","funding_links":[],"categories":[],"sub_categories":[],"readme":"\r\n## Getting started\r\n\r\nThe following code snippet comes from [Hunt-service examples](https://github.com/huntlabs/hunt-service). You may clone the sample project.\r\n\r\n```bash\r\n# git clone https://github.com/huntlabs/hunt-service.git\r\n# cd examples\r\n```\r\n\r\n### Define rpc service \r\n\r\n```D\r\nsyntax = \"proto3\";\r\n\r\npackage example.api;\r\n\r\nservice Hello {\r\n \r\n  rpc sayHello(HelloRequest) returns (HelloResponse) {\r\n\r\n  }\r\n\r\n}\r\n\r\nmessage HelloRequest{\r\n  string name = 1;\r\n}\r\n\r\nmessage HelloResponse{\r\n  string echo = 1;\r\n}\r\n```\r\n\r\n*See [example/proto/example.proto](https://github.com/huntlabs/hunt-service/blob/master/examples/proto/example.proto) on GitHub.*\r\n\r\n### Implement service interface for the provider\r\n\r\n```D\r\nmodule HelloService;\r\n\r\nimport example.api.examplerpc;\r\nimport example.api.example;\r\n\r\nimport grpc;\r\n\r\nclass HelloService : HelloBase\r\n{\r\n\toverride Status sayHello(HelloRequest req, ref HelloResponse resp)\r\n    { \r\n        resp.echo = \"hello ,\" ~ req.name;\r\n        return Status.OK; \r\n    }\r\n\r\n}\r\n```\r\n\r\n*See [provider/source/HelloService.d](https://github.com/huntlabs/hunt-service/blob/master/examples/provider/source/HelloService.d) on GitHub.*\r\n\r\n### Start service provider\r\n\r\n```D\r\nNetUtil.startEventLoop();\r\n\r\nauto providerFactory = new ServiceProviderFactory(\"127.0.0.1\",7788);\r\n\r\n// If you use a registry, use the following options\r\n// RegistryConfig conf = {\"127.0.0.1\",50051,\"example.provider\"};\r\n// providerFactory.setRegistry(conf);\r\n\r\nproviderFactory.addService(new HelloService());\r\nproviderFactory.start();\r\n```\r\n\r\n*See [provider/source/app.d](https://github.com/huntlabs/hunt-service/blob/master/examples/provider/source/app.d) on GitHub.*\r\n\r\n### Build and run the provider\r\n\r\n```bash\r\n# cd provide\r\n# dub run\r\n```\r\n\r\n### Call remote service in consumer\r\n\r\n```D\r\nNetUtil.startEventLoop();\r\n\r\nauto invokerFactory = new ServiceInvokerFactory();\r\n\r\n// If you use a registry, use the following options\r\n// RegistryConfig conf = {\"127.0.0.1\",50051,\"example.provider\"};\r\n// invokerFactory.setRegistry(conf);\r\n\r\ninvokerFactory.setDirectUrl(\"tcp://127.0.0.1:7788\");\r\nauto client = invokerFactory.createClient!(HelloClient)();\r\nassert(client !is null);\r\n\r\nHelloRequest req = new HelloRequest();\r\n\r\nforeach(num; 1 .. 10)\r\n{\r\n\treq.name = to!string(num);\r\n\r\n\tauto res = client.sayHello(req);\r\n\r\n\twriteln(\"response : \", res.echo);\r\n}\r\n```\r\n\r\n### Build and run the consumer\r\n\r\n```bash\r\n# cd consumer\r\n# dub run\r\n```\r\n\r\n*See [consumer/source/app.d](https://github.com/huntlabs/hunt-service/blob/master/examples/consumer/source/app.d) on GitHub.*\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuntlabs%2Fhunt-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhuntlabs%2Fhunt-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuntlabs%2Fhunt-service/lists"}