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
#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

Probas.Istio.AspNetCore

介绍

基于Istio的服务网格链路追踪的监控方案,应用程序携带HTTP表头信息,并将其从传入请求传播到任意传出请求。

软件架构

软件架构说明

安装Nuget包
dotnet add package Probas.Istio.AspNetCore
使用说明(配置)
  1. Startup.cs 进行如下配置
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddIstioHeaders();
        }
  1. 使用 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 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.

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