forked from microsoft/reverse-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expose IConfigNotifier callback service
Fix microsoft#1619
- Loading branch information
Showing
6 changed files
with
414 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
|
||
namespace Yarp.ReverseProxy.Configuration; | ||
|
||
/// <summary> | ||
/// Allows configuration management to optionaly notify of errors occuring during loading and applying. | ||
/// In order to leverage this service, one has got to register a type implementing this interface in | ||
/// the dependency injection container. | ||
/// </summary> | ||
public interface IConfigNotifier | ||
{ | ||
/// <summary> | ||
/// Invoked when an error occurs during the loading of the configuration. | ||
/// </summary> | ||
/// <param name="configProvider">The instance of the configuration provider that failed to provide the configuration.</param> | ||
/// <param name="ex">The thrown exception.</param> | ||
/// | ||
void ConfigurationLoadingFailed(IProxyConfigProvider configProvider, Exception ex); | ||
|
||
/// <summary> | ||
/// Invoked once the configuration have been successfully loaded. | ||
/// </summary> | ||
/// <param name="proxyConfigs">The list of instances that have been loaded.</param> | ||
/// | ||
void ConfigurationLoaded(IReadOnlyList<IProxyConfig> proxyConfigs); | ||
|
||
/// <summary> | ||
/// Invoked when an error occurs when attempting to apply the configuration. | ||
/// </summary> | ||
/// <param name="proxyConfigs">The list of instances that were being processed.</param> | ||
/// <param name="ex">The thrown exception.</param> | ||
/// | ||
void ConfigurationApplyingFailed(IReadOnlyList<IProxyConfig> proxyConfigs, Exception ex); | ||
|
||
/// <summary> | ||
/// Invoked once the configuration has been successfully applied. | ||
/// </summary> | ||
/// <param name="proxyConfigs">The list of instances that have been applied.</param> | ||
/// | ||
void ConfigurationApplied(IReadOnlyList<IProxyConfig> proxyConfigs); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.