Probas.Istio.AspNetCore
1.0.0
dotnet add package Probas.Istio.AspNetCore --version 1.0.0
NuGet\Install-Package Probas.Istio.AspNetCore -Version 1.0.0
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="Probas.Istio.AspNetCore" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Probas.Istio.AspNetCore --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Probas.Istio.AspNetCore, 1.0.0"
#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.
// Install Probas.Istio.AspNetCore as a Cake Addin
#addin nuget:?package=Probas.Istio.AspNetCore&version=1.0.0
// Install Probas.Istio.AspNetCore as a Cake Tool
#tool nuget:?package=Probas.Istio.AspNetCore&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Probas.Istio.AspNetCore
介绍
基于Istio的服务网格链路追踪的监控方案,应用程序携带HTTP表头信息,并将其从传入请求传播到任意传出请求。
软件架构
软件架构说明
安装Nuget包
dotnet add package Probas.Istio.AspNetCore
使用说明(配置)
- 在
Startup.cs
进行如下配置
public void ConfigureServices(IServiceCollection services)
{
services.AddIstioHeaders();
}
- 使用
IHttpClientFactory
或者IstioHttpClient
public class SomeClass
{
private readonly ILogger<SomeClass> _logger;
private readonly IstioHttpClient _client;
private readonly IHttpClientFactory _factory;
// IstioHttpClient 与 IHttpClientFactory 已注入可直接使用
public SomeClass(ILogger<SomeClass> logger, IstioHttpClient client, IHttpClientFactory factory)
{
_logger = logger;
_client = client;
_factory = factory;
}
public void Usage()
{
var apiurl_8828 = "http://localhost:8828/everything";
{
var result = _client.GetStringAsync(apiurl_8828).Result;
Console.WriteLine(result);
}
{
var client = _factory.CreateClient("api-8828");
var result = client.GetStringAsync(apiurl_8828).Result;
Console.WriteLine(result);
}
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net5.0
- Microsoft.AspNetCore.Hosting.Abstractions (>= 2.2.0)
- Microsoft.AspNetCore.Http (>= 2.2.2)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 5.0.0)
- Microsoft.Extensions.Http (>= 5.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0 | 337 | 3/9/2021 |