-
Notifications
You must be signed in to change notification settings - Fork 855
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expose IConfigChangeListener callback service
Fix #1619
- Loading branch information
Showing
6 changed files
with
510 additions
and
10 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,39 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
|
||
namespace Yarp.ReverseProxy.Configuration; | ||
|
||
/// <summary> | ||
/// Allows subscribing to events notifying you when the configuration is loaded and applied, or when those actions fail. | ||
/// </summary> | ||
public interface IConfigChangeListener | ||
{ | ||
/// <summary> | ||
/// Invoked when an error occurs while loading the configuration. | ||
/// </summary> | ||
/// <param name="configProvider">The instance of the configuration provider that failed to provide the configuration.</param> | ||
/// <param name="exception">The thrown exception.</param> | ||
void ConfigurationLoadingFailed(IProxyConfigProvider configProvider, Exception exception); | ||
|
||
/// <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 while applying the configuration. | ||
/// </summary> | ||
/// <param name="proxyConfigs">The list of instances that were being processed.</param> | ||
/// <param name="exception">The thrown exception.</param> | ||
void ConfigurationApplyingFailed(IReadOnlyList<IProxyConfig> proxyConfigs, Exception exception); | ||
|
||
/// <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.