Giter Site home page Giter Site logo

protobuf-net.grpc's Introduction

protobuf-net logo protobuf-net.Grpc

Build status

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:

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 Buy me a coffee

protobuf-net.grpc's People

Contributors

aaatechguy avatar almostcake avatar benbryant0 avatar bjorkstromm avatar deanward81 avatar donis- avatar elderjames avatar euan-mcvie avatar georgeduckett avatar imsh avatar isaacabraham avatar meirkr avatar mgravell avatar mhkarami97 avatar mythz avatar nickcraver avatar pengweiqhca avatar rwkarg avatar suchoss avatar tomupson avatar zgabi avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.