TCIS.Http.Grpc 1.0.8

There is a newer version of this package available.
See the version list below for details.
dotnet add package TCIS.Http.Grpc --version 1.0.8
                    
NuGet\Install-Package TCIS.Http.Grpc -Version 1.0.8
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="TCIS.Http.Grpc" Version="1.0.8" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TCIS.Http.Grpc" Version="1.0.8" />
                    
Directory.Packages.props
<PackageReference Include="TCIS.Http.Grpc" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add TCIS.Http.Grpc --version 1.0.8
                    
#r "nuget: TCIS.Http.Grpc, 1.0.8"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package TCIS.Http.Grpc@1.0.8
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=TCIS.Http.Grpc&version=1.0.8
                    
Install as a Cake Addin
#tool nuget:?package=TCIS.Http.Grpc&version=1.0.8
                    
Install as a Cake Tool

TCIS.Http.Grpc

The core gRPC library for the TCIS ecosystem, supporting automatic Context Propagation (IWorkContext) via Metadata (Headers) on both the Server (receiving requests) and Client (sending requests). It integrates basic Load Balancing and Resilience (Polly) when calling gRPC Services.

Logging contract

Bootstrap application logging once with AddTLoggingHost() (or explicitly compose AddTLogging, a real backend and contexts in a standalone host). Client and server registrations automatically add precise gRPC exception classification; they do not create a separate log provider/queue. Consul clients reuse the same interceptor.

The client records one terminal result for blocking/async unary, server streaming, client streaming and duplex streaming. Recognized input/business failures are WARN / custom.log_type=event / failure; transport, configuration, developer and unknown failures are ERROR / error / failure. Error code/type/stack and failure origin remain available on warning records. Caller cancellation is INFO/event/unknown; deadlines and unrequested transport cancellation remain incidents.

Stream headers and request CompleteAsync are not success. Completion is observed at the response task or response stream end. Reader/writer/header/disposal races share one terminal owner. Dispose an unfinished stream to release resources; its terminal result is unknown. The interceptor does not drain streams, buffer messages or log stream payloads. Existing unary payload processing/masking is retained.

Server records retain their access role while using the same severity/outcome decision; explicit non-OK server status is recorded even if no exception was thrown. Framework/Microsoft gRPC messages retain their original level independently of these TCIS-owned records. An INFO framework event with an exception remains INFO/event.

📦 Installation

dotnet add package TCIS.Http.Grpc

🚀 Usage

1. Register gRPC Server (Program.cs)

Automatically extracts TenantId, User, CorrelationId... from Metadata (sent by the Client) and attaches them to IWorkContext.

using TCIS.Http.Grpc.Extensions;

var builder = WebApplication.CreateBuilder(args);

// Register Server, automatically injects TGrpcServerInterceptor to extract Context
builder.Services.AddTGrpcServer();

var app = builder.Build();
app.MapGrpcService<MyGrpcService>();
app.Run();

2. Register gRPC Client (Program.cs)

When the Server needs to make a gRPC call to another Microservice, the current IWorkContext information is automatically propagated via TGrpcClientInterceptor.

using TCIS.Http.Grpc.Extensions;

var builder = WebApplication.CreateBuilder(args);

// Register GrpcClient to call directly with a fixed Address
builder.Services.AddTGrpcClient<MyService.MyServiceClient>("https://localhost:5001");

// OR: Register multiple clients simultaneously via `appsettings.json` configuration
var clients = new Dictionary<string, Type>
{
    { "MyService", typeof(MyService.MyServiceClient) }
};
builder.Services.AddTGrpcClients(builder.Configuration, clients);

3. gRPC Client Configuration in appsettings.json

Used with the AddTGrpcClients method:

{
  "GrpcConfigs": {
    "MyService": {
      "Url": "https://localhost:5001"
    }
  }
}

⚙️ Core Components

  • AddTGrpcServer: Configures GrpcServiceOptions and adds TGrpcServerInterceptor.
  • AddTGrpcClient<TClient>: Configures GrpcClient with RoundRobin Load Balancing if using consul://, k8s://, dns:// schemes, and adds TGrpcClientInterceptor along with Resilience.
  • AddTGrpcClients: A manager for initializing multiple gRPC clients based on appsettings.json.
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on TCIS.Http.Grpc:

Package Downloads
TCIS.Http.Grpc.Kubernetes

TCIS Core Framework is an application framework for building modular, multi-tenant applications on ASP.NET Core. Kubernetes Endpoints API service discovery and load balancing for gRPC clients.

TCIS.Http.Grpc.Consul

TCIS Core Framework is an application framework for building modular, multi-tenant applications on ASP.NET Core. Consul service discovery and load balancing for gRPC clients.

TCIS.Logging.Hosting

One-call TCIS application logging composition, startup lifecycle and downstream failure attribution.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.3 85 11/11/2026
1.1.2 102 11/10/2026
1.1.1 104 11/9/2026
1.1.0 108 11/7/2026
1.0.9 155 11/5/2026
1.0.9-rc.2 72 11/5/2026
1.0.9-rc.1 77 11/4/2026
1.0.8 144 11/3/2026
1.0.8-rc.11 74 10/30/2026
1.0.8-rc.10 70 10/30/2026
1.0.8-rc.9 77 10/30/2026
1.0.8-rc.8 73 10/29/2026
1.0.8-rc.7 72 10/27/2026
1.0.8-rc.6 79 10/27/2026
1.0.8-rc.5 80 10/23/2026
1.0.8-rc.4 76 10/23/2026
1.0.8-rc.3 81 10/23/2026
1.0.8-rc.2 76 10/22/2026
1.0.8-rc.1 75 10/22/2026
1.0.7 120 10/22/2026
Loading failed