{"id":28639786,"url":"https://github.com/yileicn/grpc.extensions","last_synced_at":"2025-06-12T19:41:16.281Z","repository":{"id":40909249,"uuid":"157315022","full_name":"yileicn/Grpc.Extensions","owner":"yileicn","description":"Grpc扩展是一个基于GRPC的简单微服务框架","archived":false,"fork":false,"pushed_at":"2022-12-08T02:17:36.000Z","size":7371,"stargazers_count":35,"open_issues_count":9,"forks_count":16,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-06-10T05:18:19.729Z","etag":null,"topics":["consul","csharp","dashboard","dotnet","dotnetcore","grpc","grpc-codefirst","micorservice","opentracing","polly"],"latest_commit_sha":null,"homepage":"","language":"C#","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/yileicn.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":"2018-11-13T03:30:29.000Z","updated_at":"2024-03-03T13:05:47.000Z","dependencies_parsed_at":"2023-01-25T03:15:58.266Z","dependency_job_id":null,"html_url":"https://github.com/yileicn/Grpc.Extensions","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/yileicn/Grpc.Extensions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yileicn%2FGrpc.Extensions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yileicn%2FGrpc.Extensions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yileicn%2FGrpc.Extensions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yileicn%2FGrpc.Extensions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yileicn","download_url":"https://codeload.github.com/yileicn/Grpc.Extensions/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yileicn%2FGrpc.Extensions/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259520285,"owners_count":22870415,"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":["consul","csharp","dashboard","dotnet","dotnetcore","grpc","grpc-codefirst","micorservice","opentracing","polly"],"created_at":"2025-06-12T19:41:14.857Z","updated_at":"2025-06-12T19:41:16.250Z","avatar_url":"https://github.com/yileicn.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Grpc.Extesions\n一个基于GRPC的简单微服务框架\n\n## 功能\n- 服务注册和发现\n    - 默认使用Consul实现\n    - 实现IServiceDiscovery,IServiceRegister可扩展zk等\n- 服务自动负载均衡\n    - 默认使用轮询实现,可切换随机算法\n    - 实现ILoadBalancer可扩展\n- 服务容错\n    - 服务连接报错，自动切换节点重试3次\n    - 可在DashBoard上手动熔断\n- 调用链跟踪\n    - 根据配制来启用Jaeger调用链跟踪\n- 服务网关\n    - 使用Kong网关可实现服务的认证授权，协议转换(grpc转http)，服务路由，服务限流和熔断等\n    - 使用Ocelot网关也可实现上述功能 \n- 服务配制\n    - 使用Apollo配制中心\n- Grpc DashBoard和监控\n    - Http远程调用,手动熔断,日志输出控制\n    - 服务报警，可监听日志事件实现错误和超时的钉钉报警\n    - 待实现服务统计数据和监控(目前使用日志查询来统计服务的调用次数和调用时长等)\n- 服务端中件间\n    - 性能监控[日志,分布式调用链],全局错误处理,手动熔断\n    - 实现ServerInterceptor可扩展\t\n- 客户端中件间\n    - 性能监控[日志,分布式调用链],超时时间设置\n    - 实现ClientInterceptor可扩展\n- Grpc ProtoFirst\n    - 通过Proto生成代码和注释\n- Grpc CodeFirst\n    - 通过代码生成proto和注释给第三方语言使用(GrpcMethod自动注册)\n    - 代码更干净且方便扩展，例如可以在ProtoMessage上打验证特性来统一处理验证逻辑等\n    - 更方便拆分GrpcService到多个类，而不是使用partial class\n\n### NuGet Package\n支持NetFramework4.6,NetCore2.1\n- [Grpc.Extensions 服务端](https://www.nuget.org/packages/FM.Grpc.Extensions/)\n- [Grpc.Extensions.Client 客户端](https://www.nuget.org/packages/FM.Grpc.Extensions.Client/)\n- [Grpc.Extensions.Discovery 服务注册和发现](https://www.nuget.org/packages/FM.Grpc.Extensions.Discovery/)\n\n支持asp.netcore3.0\n- [Grpc.Extensions.AspNetCore 服务端](https://www.nuget.org/packages/FM.Grpc.Extensions.AspNetCore/)\n- [Grpc.Extensions.Client 客户端](https://www.nuget.org/packages/FM.Grpc.Extensions.Client/)\n- [Grpc.Extensions.Discovery 服务注册和发现](https://www.nuget.org/packages/FM.Grpc.Extensions.Discovery/)\n\n### Documentation\n- [Grpc ProtoFirst Demo](https://github.com/yileicn/Grpc.Extensions/tree/master/examples/Greeter)\n- [Grpc CodeFirst Demo](https://github.com/yileicn/Grpc.Extensions/tree/master/examples/CodeFirst)\n\n\n\n## 待完善\n- 使用Polly实现重试，降级，熔断\n\n## 依赖的技术栈\n-  [dotnet standard 2.0]()\n-  [gRPC - An RPC library and framework](https://github.com/grpc/grpc)\n-  [gRPC-dotnet - gRPC for .NET](https://github.com/grpc/grpc-dotnet)\n-  [Protobuf-net - Protocol Buffers library for idiomatic .NET](https://github.com/protobuf-net/protobuf-net)\n-  [Consul - Service Discovery and Configuration Made Easy](https://consul.io)\n-  [Polly - Polly is a .NET resilience and transient-fault-handling library](https://github.com/App-vNext/Polly)\n-  [OpenTracing(Jaeger) - a Distributed Tracing System](https://github.com/jaegertracing/jaeger)\n\n## 感谢\n感谢以下的项目,排名不分先后\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyileicn%2Fgrpc.extensions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyileicn%2Fgrpc.extensions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyileicn%2Fgrpc.extensions/lists"}