{"id":15446162,"url":"https://github.com/moul/grpcbin","last_synced_at":"2025-04-14T11:18:24.582Z","repository":{"id":27868458,"uuid":"114640186","full_name":"moul/grpcbin","owner":"moul","description":"httpbin like for gRPC","archived":false,"fork":false,"pushed_at":"2025-03-30T12:43:17.000Z","size":3048,"stargazers_count":161,"open_issues_count":23,"forks_count":28,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-31T01:09:16.446Z","etag":null,"topics":["grpc","protobuf","server","stream","testing"],"latest_commit_sha":null,"homepage":"https://grpcb.in/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/moul.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":".github/SUPPORT.md","governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["moul"],"patreon":"moul","open_collective":"moul","custom":["https://manfred.life/donate"]}},"created_at":"2017-12-18T12:46:45.000Z","updated_at":"2025-01-06T04:59:33.000Z","dependencies_parsed_at":"2024-01-03T21:26:36.632Z","dependency_job_id":"2c679e4d-4b86-4bb3-bc6c-f2e2cc503f89","html_url":"https://github.com/moul/grpcbin","commit_stats":{"total_commits":130,"total_committers":8,"mean_commits":16.25,"dds":0.5923076923076923,"last_synced_commit":"70fd6d4daa74ed71089a79a629e822084931d708"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moul%2Fgrpcbin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moul%2Fgrpcbin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moul%2Fgrpcbin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moul%2Fgrpcbin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moul","download_url":"https://codeload.github.com/moul/grpcbin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247578556,"owners_count":20961271,"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":["grpc","protobuf","server","stream","testing"],"created_at":"2024-10-01T19:58:52.853Z","updated_at":"2025-04-07T02:15:36.410Z","avatar_url":"https://github.com/moul.png","language":"Go","funding_links":["https://github.com/sponsors/moul","https://patreon.com/moul","https://opencollective.com/moul","https://manfred.life/donate"],"categories":[],"sub_categories":[],"readme":"# grpcbin\nhttpbin like for gRPC\n\n[![CircleCI](https://circleci.com/gh/moul/grpcbin.svg?style=svg)](https://circleci.com/gh/moul/grpcbin)\n[![Docker Build Status](https://img.shields.io/docker/build/moul/grpcbin.svg)](https://hub.docker.com/r/moul/grpcbin/)\n[![Go Report Card](https://goreportcard.com/badge/moul.io/grpcbin)](https://goreportcard.com/report/moul.io/grpcbin)\n[![GoDoc](https://godoc.org/moul.io/grpcbin?status.svg)](https://godoc.org/moul.io/grpcbin/handler)\n[![License](https://img.shields.io/github/license/moul/grpcbin.svg)](https://github.com/moul/grpcbin/blob/master/LICENSE)\n\n![overview](https://raw.githubusercontent.com/moul/grpcbin/master/.assets/overview.svg?sanitize=true)\n\n## Links\n\n* Servers\n  * insecure gRPC (over HTTP, without TLS): grpc://grpcb.in:9000\n  * secure gRPC (with let's encrypt TLS): grpc://grpcb.in:443 and grpc://grpcb.in:9001\n  * webserver: https://grpcb.in\n* Services\n  * [grpcbin.proto](https://github.com/moul/pb/blob/master/grpcbin/grpcbin.proto)\n  * [hello.proto](https://github.com/moul/pb/blob/master/hello/hello.proto)\n  * [addsvc.proto](https://github.com/moul/pb/blob/master/addsvc/addsvc.proto)\n* Examples\n  * multiple languages: https://github.com/moul/grpcbin-example\n  * haskell: https://github.com/lucasdicioccio/http2-client-grpc-example/\n\n## Run server locally\n\n```console\n$ docker run -it --rm -p 9000:9000 -p 9001:9001 moul/grpcbin\n2017/12/18 14:48:01 listening on :9000 (insecure)\n2017/12/18 14:48:01 listening on :9001 (secure)\n```\n\n## Example\n\nSee examples on a the dedicated repo: [grpcbin-example](https://github.com/moul/grpcbin-example)\n\n---\n\n#### Golang\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\n\t\"golang.org/x/net/context\"\n\t\"google.golang.org/grpc\"\n\n\tpb \"github.com/moul/pb/grpcbin/go-grpc\"\n)\n\nfunc main() {\n\t// dial\n\tconn, _ := grpc.Dial(\"grpcb.in:9000\", grpc.WithInsecure())\n\tdefer conn.Close()\n\n\t// create client and context\n\tclient := pb.NewGRPCBinClient(conn)\n\tctx := context.Background()\n\n\t// call DummyUnary\n\tres, err := client.DummyUnary(ctx, \u0026pb.DummyMessage{\n\t\tFString: \"hello\",\n\t\tFInt32:  42,\n\t})\n\tif err != nil {\n\t\tlog.Fatalf(\"failed to call DummyUnary: %v\", err)\n\t}\n\tfmt.Println(res)\n}\n```\n\n---\n\nExample with [grpcc](https://github.com/njpatel/grpcc):\n\n```console\n# fetch proto and install tool\n$ wget -qN https://github.com/moul/pb/raw/master/grpcbin/grpcbin.proto\n$ npm install -g grpcc\n\n# interactive client\n$ grpcc -i -p ./grpcbin.proto --address grpcb.in:9000\nConnecting to grpcbin.GRPCBin on grpcb.in:9000. Available globals:\n\n  client - the client connection to GRPCBin\n    index (EmptyMessage, callback) returns IndexReply\n    dummyUnary (DummyMessage, callback) returns DummyMessage\n    dummyServerStream (DummyMessage, callback) returns DummyMessage\n    dummyClientStream (DummyMessage, callback) returns DummyMessage\n    dummyBidirectionalStreamStream (DummyMessage, callback) returns DummyMessage\n\n  printReply - function to easily print a unary call reply (alias: pr)\n  streamReply - function to easily print stream call replies (alias: sr)\n  createMetadata - convert JS objects into grpc metadata instances (alias: cm)\n\nGRPCBin@grpcb.in:9000\u003e ^C\n\n# call index endpoint\n$ grpcc -i -p ./grpcbin.proto --address grpcb.in:9000 --eval 'client.index({}, printReply)'\n{\n  \"description\": \"gRPC testing server\",\n  \"endpoints\": [\n    {\n      \"path\": \"index\",\n      \"description\": \"This endpoint.\"\n    },\n    {\n      \"path\": \"dummyUnary\",\n      \"description\": \"Unary endpoint that replies a received DummyMessage.\"\n    },\n    [...]\n  ]\n}\n\n# call dummyUnary with arguments\n$ grpcc -i -p ./grpcbin.proto --address grpcb.in:9000 --eval 'client.dummyUnary({f_string:\"hello\",f_int32:42}, printReply)'\n{\n  \"f_string\": \"hello\",\n  \"f_strings\": [],\n  \"f_int32\": 42,\n  \"f_int32s\": [],\n  \"f_enum\": \"ENUM_0\",\n  \"f_enums\": [],\n  \"f_sub\": null,\n  \"f_subs\": [],\n  \"f_bool\": false,\n  \"f_bools\": [],\n  \"f_int64\": \"0\",\n  \"f_int64s\": [],\n  \"f_bytes\": {\n    \"type\": \"Buffer\",\n    \"data\": []\n  },\n  \"f_bytess\": [],\n  \"f_float\": 0,\n  \"f_floats\": []\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoul%2Fgrpcbin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoul%2Fgrpcbin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoul%2Fgrpcbin/lists"}