private static Microsoft.ReverseProxy.Abstractions.ActiveHealthCheckOptions CreateActiveHealthCheckOptions(ActiveHealthCheckOptions activeHealthCheckOptions)
        {
            if (activeHealthCheckOptions is null)
            {
                return(null);
            }

            return(new Microsoft.ReverseProxy.Abstractions.ActiveHealthCheckOptions
            {
                Enabled = activeHealthCheckOptions.Enabled ?? false,
                Interval = activeHealthCheckOptions.Interval.ReadTimeSpan(),
                Timeout = activeHealthCheckOptions.Timeout.ReadTimeSpan(),
                Policy = activeHealthCheckOptions.Policy,
                Path = activeHealthCheckOptions.Path
            });
        }
Пример #2
0
        private static Yarp.ReverseProxy.Configuration.ActiveHealthCheckConfig?CreateActiveHealthCheckOptions(ActiveHealthCheckOptions activeHealthCheckOptions)
        {
            if (activeHealthCheckOptions is null)
            {
                return(null);
            }

            return(new Yarp.ReverseProxy.Configuration.ActiveHealthCheckConfig
            {
                Enabled = activeHealthCheckOptions.Enabled,
                Interval = activeHealthCheckOptions.Interval.ReadTimeSpan(),
                Timeout = activeHealthCheckOptions.Timeout.ReadTimeSpan(),
                Policy = activeHealthCheckOptions.Policy,
                Path = activeHealthCheckOptions.Path
            });
        }