Last active
August 23, 2021 10:20
-
-
Save einarwh/5c4df5130960eba7886ba3045f82ed29 to your computer and use it in GitHub Desktop.
GetFaultConfig.
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
private IFaultConfig GetFaultConfig() | |
{ | |
if (_unleash.IsEnabled("ps-playback-api-channel-blob-storage-inject-fault-always")) | |
{ | |
return new EnabledFault { InjectionRate = 1.00 }; | |
} | |
else if (_unleash.IsEnabled("ps-playback-api-channel-blob-storage-inject-fault-terrible-rate")) | |
{ | |
return new EnabledFault { InjectionRate = 0.90 }; | |
} | |
else if (_unleash.IsEnabled("ps-playback-api-channel-blob-storage-inject-fault-severe-rate")) | |
{ | |
return new EnabledFault { InjectionRate = 0.50 }; | |
} | |
else if (_unleash.IsEnabled("ps-playback-api-channel-blob-storage-inject-fault-moderate-rate")) | |
{ | |
return new EnabledFault { InjectionRate = 0.20 }; | |
} | |
else if (_unleash.IsEnabled("ps-playback-api-channel-blob-storage-inject-fault-low-rate")) | |
{ | |
return new EnabledFault { InjectionRate = 0.05 }; | |
} | |
else | |
{ | |
return new DisabledFault(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment