-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
248 additions
and
0 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
ApiReview/API.Polly.Core/NoDocs/Polly.Simmy.Behavior/BehaviorActionArguments.cs
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,11 @@ | ||
// Assembly 'Polly.Core' | ||
|
||
using System.Runtime.CompilerServices; | ||
|
||
namespace Polly.Simmy.Behavior; | ||
|
||
public readonly struct BehaviorActionArguments | ||
{ | ||
public ResilienceContext Context { get; } | ||
public BehaviorActionArguments(ResilienceContext context); | ||
} |
16 changes: 16 additions & 0 deletions
16
ApiReview/API.Polly.Core/NoDocs/Polly.Simmy.Behavior/BehaviorStrategyOptions.cs
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,16 @@ | ||
// Assembly 'Polly.Core' | ||
|
||
using System; | ||
using System.ComponentModel.DataAnnotations; | ||
using System.Runtime.CompilerServices; | ||
using System.Threading.Tasks; | ||
|
||
namespace Polly.Simmy.Behavior; | ||
|
||
public class BehaviorStrategyOptions : MonkeyStrategyOptions | ||
{ | ||
public Func<OnBehaviorInjectedArguments, ValueTask>? OnBehaviorInjected { get; set; } | ||
[Required] | ||
public Func<BehaviorActionArguments, ValueTask>? BehaviorAction { get; set; } | ||
public BehaviorStrategyOptions(); | ||
} |
11 changes: 11 additions & 0 deletions
11
ApiReview/API.Polly.Core/NoDocs/Polly.Simmy.Behavior/OnBehaviorInjectedArguments.cs
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,11 @@ | ||
// Assembly 'Polly.Core' | ||
|
||
using System.Runtime.CompilerServices; | ||
|
||
namespace Polly.Simmy.Behavior; | ||
|
||
public readonly struct OnBehaviorInjectedArguments | ||
{ | ||
public ResilienceContext Context { get; } | ||
public OnBehaviorInjectedArguments(ResilienceContext context); | ||
} |
11 changes: 11 additions & 0 deletions
11
ApiReview/API.Polly.Core/NoDocs/Polly.Simmy.Latency/LatencyGeneratorArguments.cs
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,11 @@ | ||
// Assembly 'Polly.Core' | ||
|
||
using System.Runtime.CompilerServices; | ||
|
||
namespace Polly.Simmy.Latency; | ||
|
||
public readonly struct LatencyGeneratorArguments | ||
{ | ||
public ResilienceContext Context { get; } | ||
public LatencyGeneratorArguments(ResilienceContext context); | ||
} |
15 changes: 15 additions & 0 deletions
15
ApiReview/API.Polly.Core/NoDocs/Polly.Simmy.Latency/LatencyStrategyOptions.cs
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,15 @@ | ||
// Assembly 'Polly.Core' | ||
|
||
using System; | ||
using System.Runtime.CompilerServices; | ||
using System.Threading.Tasks; | ||
|
||
namespace Polly.Simmy.Latency; | ||
|
||
public class LatencyStrategyOptions : MonkeyStrategyOptions | ||
{ | ||
public Func<OnLatencyArguments, ValueTask>? OnLatency { get; set; } | ||
public Func<LatencyGeneratorArguments, ValueTask<TimeSpan>>? LatencyGenerator { get; set; } | ||
public TimeSpan Latency { get; set; } | ||
public LatencyStrategyOptions(); | ||
} |
13 changes: 13 additions & 0 deletions
13
ApiReview/API.Polly.Core/NoDocs/Polly.Simmy.Latency/OnLatencyArguments.cs
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,13 @@ | ||
// Assembly 'Polly.Core' | ||
|
||
using System; | ||
using System.Runtime.CompilerServices; | ||
|
||
namespace Polly.Simmy.Latency; | ||
|
||
public readonly struct OnLatencyArguments | ||
{ | ||
public ResilienceContext Context { get; } | ||
public TimeSpan Latency { get; } | ||
public OnLatencyArguments(ResilienceContext context, TimeSpan latency); | ||
} |
12 changes: 12 additions & 0 deletions
12
ApiReview/API.Polly.Core/NoDocs/Polly.Simmy.Outcomes/OnOutcomeInjectedArguments.cs
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,12 @@ | ||
// Assembly 'Polly.Core' | ||
|
||
using System.Runtime.CompilerServices; | ||
|
||
namespace Polly.Simmy.Outcomes; | ||
|
||
public readonly struct OnOutcomeInjectedArguments<TResult> | ||
{ | ||
public ResilienceContext Context { get; } | ||
public Outcome<TResult> Outcome { get; } | ||
public OnOutcomeInjectedArguments(ResilienceContext context, Outcome<TResult> outcome); | ||
} |
11 changes: 11 additions & 0 deletions
11
ApiReview/API.Polly.Core/NoDocs/Polly.Simmy.Outcomes/OutcomeGeneratorArguments.cs
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,11 @@ | ||
// Assembly 'Polly.Core' | ||
|
||
using System.Runtime.CompilerServices; | ||
|
||
namespace Polly.Simmy.Outcomes; | ||
|
||
public readonly struct OutcomeGeneratorArguments | ||
{ | ||
public ResilienceContext Context { get; } | ||
public OutcomeGeneratorArguments(ResilienceContext context); | ||
} |
15 changes: 15 additions & 0 deletions
15
ApiReview/API.Polly.Core/NoDocs/Polly.Simmy.Outcomes/OutcomeStrategyOptions.TResult.cs
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,15 @@ | ||
// Assembly 'Polly.Core' | ||
|
||
using System; | ||
using System.Runtime.CompilerServices; | ||
using System.Threading.Tasks; | ||
|
||
namespace Polly.Simmy.Outcomes; | ||
|
||
public class OutcomeStrategyOptions<TResult> : MonkeyStrategyOptions | ||
{ | ||
public Func<OnOutcomeInjectedArguments<TResult>, ValueTask>? OnOutcomeInjected { get; set; } | ||
public Func<OutcomeGeneratorArguments, ValueTask<Outcome<TResult>?>>? OutcomeGenerator { get; set; } | ||
public Outcome<TResult>? Outcome { get; set; } | ||
public OutcomeStrategyOptions(); | ||
} |
8 changes: 8 additions & 0 deletions
8
ApiReview/API.Polly.Core/NoDocs/Polly.Simmy.Outcomes/OutcomeStrategyOptions.cs
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,8 @@ | ||
// Assembly 'Polly.Core' | ||
|
||
namespace Polly.Simmy.Outcomes; | ||
|
||
public class OutcomeStrategyOptions : OutcomeStrategyOptions<object> | ||
{ | ||
public OutcomeStrategyOptions(); | ||
} |
14 changes: 14 additions & 0 deletions
14
ApiReview/API.Polly.Core/NoDocs/Polly.Simmy/BehaviorChaosPipelineBuilderExtensions.cs
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,14 @@ | ||
// Assembly 'Polly.Core' | ||
|
||
using System; | ||
using System.Diagnostics.CodeAnalysis; | ||
using System.Threading.Tasks; | ||
using Polly.Simmy.Behavior; | ||
|
||
namespace Polly.Simmy; | ||
|
||
public static class BehaviorChaosPipelineBuilderExtensions | ||
{ | ||
public static TBuilder AddChaosBehavior<TBuilder>(this TBuilder builder, bool enabled, double injectionRate, Func<ValueTask> behavior) where TBuilder : ResiliencePipelineBuilderBase; | ||
public static TBuilder AddChaosBehavior<TBuilder>(this TBuilder builder, BehaviorStrategyOptions options) where TBuilder : ResiliencePipelineBuilderBase; | ||
} |
11 changes: 11 additions & 0 deletions
11
ApiReview/API.Polly.Core/NoDocs/Polly.Simmy/EnabledGeneratorArguments.cs
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,11 @@ | ||
// Assembly 'Polly.Core' | ||
|
||
using System.Runtime.CompilerServices; | ||
|
||
namespace Polly.Simmy; | ||
|
||
public readonly struct EnabledGeneratorArguments | ||
{ | ||
public ResilienceContext Context { get; } | ||
public EnabledGeneratorArguments(ResilienceContext context); | ||
} |
11 changes: 11 additions & 0 deletions
11
ApiReview/API.Polly.Core/NoDocs/Polly.Simmy/InjectionRateGeneratorArguments.cs
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,11 @@ | ||
// Assembly 'Polly.Core' | ||
|
||
using System.Runtime.CompilerServices; | ||
|
||
namespace Polly.Simmy; | ||
|
||
public readonly struct InjectionRateGeneratorArguments | ||
{ | ||
public ResilienceContext Context { get; } | ||
public InjectionRateGeneratorArguments(ResilienceContext context); | ||
} |
13 changes: 13 additions & 0 deletions
13
ApiReview/API.Polly.Core/NoDocs/Polly.Simmy/LatencyChaosPipelineBuilderExtensions.cs
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,13 @@ | ||
// Assembly 'Polly.Core' | ||
|
||
using System; | ||
using System.Diagnostics.CodeAnalysis; | ||
using Polly.Simmy.Latency; | ||
|
||
namespace Polly.Simmy; | ||
|
||
public static class LatencyChaosPipelineBuilderExtensions | ||
{ | ||
public static TBuilder AddChaosLatency<TBuilder>(this TBuilder builder, bool enabled, double injectionRate, TimeSpan latency) where TBuilder : ResiliencePipelineBuilderBase; | ||
public static TBuilder AddChaosLatency<TBuilder>(this TBuilder builder, LatencyStrategyOptions options) where TBuilder : ResiliencePipelineBuilderBase; | ||
} |
14 changes: 14 additions & 0 deletions
14
ApiReview/API.Polly.Core/NoDocs/Polly.Simmy/MonkeyStrategy.T.cs
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,14 @@ | ||
// Assembly 'Polly.Core' | ||
|
||
using System; | ||
using System.Diagnostics; | ||
using System.Runtime.CompilerServices; | ||
using System.Threading.Tasks; | ||
|
||
namespace Polly.Simmy; | ||
|
||
public abstract class MonkeyStrategy<T> : ResilienceStrategy<T> | ||
{ | ||
protected MonkeyStrategy(MonkeyStrategyOptions options); | ||
protected ValueTask<bool> ShouldInjectAsync(ResilienceContext context); | ||
} |
14 changes: 14 additions & 0 deletions
14
ApiReview/API.Polly.Core/NoDocs/Polly.Simmy/MonkeyStrategy.cs
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,14 @@ | ||
// Assembly 'Polly.Core' | ||
|
||
using System; | ||
using System.Diagnostics; | ||
using System.Runtime.CompilerServices; | ||
using System.Threading.Tasks; | ||
|
||
namespace Polly.Simmy; | ||
|
||
public abstract class MonkeyStrategy : ResilienceStrategy | ||
{ | ||
protected MonkeyStrategy(MonkeyStrategyOptions options); | ||
protected ValueTask<bool> ShouldInjectAsync(ResilienceContext context); | ||
} |
20 changes: 20 additions & 0 deletions
20
ApiReview/API.Polly.Core/NoDocs/Polly.Simmy/MonkeyStrategyOptions.TResult.cs
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,20 @@ | ||
// Assembly 'Polly.Core' | ||
|
||
using System; | ||
using System.ComponentModel.DataAnnotations; | ||
using System.Runtime.CompilerServices; | ||
using System.Threading.Tasks; | ||
|
||
namespace Polly.Simmy; | ||
|
||
public abstract class MonkeyStrategyOptions<TResult> : ResilienceStrategyOptions | ||
{ | ||
[Range(0.0, 1.0)] | ||
public double InjectionRate { get; set; } | ||
public Func<InjectionRateGeneratorArguments, ValueTask<double>>? InjectionRateGenerator { get; set; } | ||
public Func<EnabledGeneratorArguments, ValueTask<bool>>? EnabledGenerator { get; set; } | ||
public bool Enabled { get; set; } | ||
[Required] | ||
public Func<double> Randomizer { get; set; } | ||
protected MonkeyStrategyOptions(); | ||
} |
8 changes: 8 additions & 0 deletions
8
ApiReview/API.Polly.Core/NoDocs/Polly.Simmy/MonkeyStrategyOptions.cs
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,8 @@ | ||
// Assembly 'Polly.Core' | ||
|
||
namespace Polly.Simmy; | ||
|
||
public abstract class MonkeyStrategyOptions : MonkeyStrategyOptions<object> | ||
{ | ||
protected MonkeyStrategyOptions(); | ||
} |
20 changes: 20 additions & 0 deletions
20
ApiReview/API.Polly.Core/NoDocs/Polly.Simmy/OutcomeChaosPipelineBuilderExtensions.cs
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,20 @@ | ||
// Assembly 'Polly.Core' | ||
|
||
using System; | ||
using System.Diagnostics.CodeAnalysis; | ||
using Polly.Simmy.Outcomes; | ||
|
||
namespace Polly.Simmy; | ||
|
||
public static class OutcomeChaosPipelineBuilderExtensions | ||
{ | ||
public static ResiliencePipelineBuilder AddChaosFault(this ResiliencePipelineBuilder builder, bool enabled, double injectionRate, Exception fault); | ||
public static ResiliencePipelineBuilder AddChaosFault(this ResiliencePipelineBuilder builder, bool enabled, double injectionRate, Func<Exception?> faultGenerator); | ||
public static ResiliencePipelineBuilder AddChaosFault(this ResiliencePipelineBuilder builder, OutcomeStrategyOptions<Exception> options); | ||
public static ResiliencePipelineBuilder<TResult> AddChaosFault<TResult>(this ResiliencePipelineBuilder<TResult> builder, bool enabled, double injectionRate, Exception fault); | ||
public static ResiliencePipelineBuilder<TResult> AddChaosFault<TResult>(this ResiliencePipelineBuilder<TResult> builder, bool enabled, double injectionRate, Func<Exception?> faultGenerator); | ||
public static ResiliencePipelineBuilder<TResult> AddChaosFault<TResult>(this ResiliencePipelineBuilder<TResult> builder, OutcomeStrategyOptions<Exception> options); | ||
public static ResiliencePipelineBuilder<TResult> AddChaosResult<TResult>(this ResiliencePipelineBuilder<TResult> builder, bool enabled, double injectionRate, TResult result); | ||
public static ResiliencePipelineBuilder<TResult> AddChaosResult<TResult>(this ResiliencePipelineBuilder<TResult> builder, bool enabled, double injectionRate, Func<TResult?> outcomeGenerator); | ||
public static ResiliencePipelineBuilder<TResult> AddChaosResult<TResult>(this ResiliencePipelineBuilder<TResult> builder, OutcomeStrategyOptions<TResult> options); | ||
} |