private static Microsoft.ReverseProxy.Abstractions.HealthCheckOptions CreateHealthCheckOptions(HealthCheckOptions healthCheckOptions)
        {
            if (healthCheckOptions is null)
            {
                return(null);
            }

            return(new Microsoft.ReverseProxy.Abstractions.HealthCheckOptions
            {
                Passive = CreatePassiveHealthCheckOptions(healthCheckOptions.Passive),
                Active = CreateActiveHealthCheckOptions(healthCheckOptions.Active)
            });
        }
Example #2
0
        private static Yarp.ReverseProxy.Configuration.HealthCheckConfig?CreateHealthCheckOptions(HealthCheckOptions healthCheckOptions)
        {
            if (healthCheckOptions is null)
            {
                return(null);
            }

            return(new Yarp.ReverseProxy.Configuration.HealthCheckConfig
            {
                Passive = CreatePassiveHealthCheckOptions(healthCheckOptions.Passive),
                Active = CreateActiveHealthCheckOptions(healthCheckOptions.Active),
                AvailableDestinationsPolicy = healthCheckOptions.AvailableDestinationsPolicy
            });
        }