/
aprogrammer
/
reverse-proxy-ms-yarp
Обзор
Документация
Войти
/
aprogrammer
/
reverse-proxy-ms-yarp
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/ReverseProxy/Configuration/IProxyConfig.cs
37 строк
1 KB
nulltoken
Expose IConfigChangeListener callback service (#1734)
19 авг 2022, 19:39
Не верифицирован
19 авг 2022, 19:39
9253842
Код
Авторство
О чём код?
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. using System; using System.Collections.Generic; using System.Runtime.CompilerServices; using Microsoft.Extensions.Primitives; namespace Yarp.ReverseProxy.Configuration; /// <summary> /// Represents a snapshot of proxy configuration data. These properties may be accessed multiple times and should not be modified. /// </summary> public interface IProxyConfig { private static readonly ConditionalWeakTable<IProxyConfig, string> _revisionIdsTable = new(); /// <summary> /// A unique identifier for this revision of the configuration. /// </summary> string RevisionId => _revisionIdsTable.GetValue(this, static _ => Guid.NewGuid().ToString()); /// <summary> /// Routes matching requests to clusters. /// </summary> IReadOnlyList<RouteConfig> Routes { get; } /// <summary> /// Cluster information for where to proxy requests to. /// </summary> IReadOnlyList<ClusterConfig> Clusters { get; } /// <summary> /// A notification that triggers when this snapshot expires. /// </summary> IChangeToken ChangeToken { get; } }