protobuf-net/protobuf-net.Grpc
소개
protobuf-net 및 grpc-dotnet용 GRPC 바인딩
개발 도구측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- +1
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Original
protobuf-net.Grpc
protobuf-net.Grpc adds code-first support for services over gRPC using either the native Grpc.Core API, or the fully-managed Grpc.Net.Client / Grpc.AspNetCore.Server API.
It should work on all .NET languages that can generate something even remotely like a regular .NET type model.
Usage is as simple as declaring an interface for your service-contract:
[ServiceContract]
public interface IMyAmazingService {
ValueTask<SearchResponse> SearchAsync(SearchRequest request);
// ...
}
then either implementing that interface for a server:
public class MyServer : IMyAmazingService {
// ...
}
or asking the system for a client:
var client = http.CreateGrpcService<IMyAmazingService>();
var results = await client.SearchAsync(request);
This would be equivalent to the service in .proto:
service MyAmazingService {
rpc Search (SearchRequest) returns (SearchResponse) {}
// ...
}
Obviously you need to tell it the uri etc - see Getting Started. Usually the configuration is convention-based, but if you prefer: there are various configuration options.
Getting hold of it
Everything is available as pre-built packages on nuget; in particular, you probably want one of:
protobuf-net.Grpc.AspNetCorefor servers using ASP.NET Coreprotobuf-net.Grpc.ClientFactoryfor clients resolved from dependency injectionprotobuf-net.GrpcandGrpc.Net.Clientfor clients usingHttpClientprotobuf-net.Grpc.Nativefor clients or servers using the native/unmanaged API
Usage examples are available in C#, VB and F#.
Anything else?
protobuf-net.Grpc is created and maintained by Marc Gravell (@marcgravell), the author of protobuf-net.
It makes use of tools from grpc, but is not official associated with, affiliated with, or endorsed by that project.
I look forward to your feedback, and if this could save you a ton of time, you're always welcome to 
관련 프로젝트 살펴보기
불러오는 중…