From 8b4fb26473256da5eaa89f3e9d2ac5d44f1e9b88 Mon Sep 17 00:00:00 2001 From: vnugent Date: Sat, 15 Jul 2023 13:06:00 -0400 Subject: Latest working draft --- .../src/VnCacheClientConfig.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/VNLib.Plugins.Extensions.VNCache/src/VnCacheClientConfig.cs') diff --git a/lib/VNLib.Plugins.Extensions.VNCache/src/VnCacheClientConfig.cs b/lib/VNLib.Plugins.Extensions.VNCache/src/VnCacheClientConfig.cs index 73fb70f..bfa9d92 100644 --- a/lib/VNLib.Plugins.Extensions.VNCache/src/VnCacheClientConfig.cs +++ b/lib/VNLib.Plugins.Extensions.VNCache/src/VnCacheClientConfig.cs @@ -53,8 +53,8 @@ namespace VNLib.Plugins.Extensions.VNCache /// The time (in seconds) to randomly delay polling the broker server /// for available servers /// - [JsonPropertyName("retry_interval_sec")] - public int? RetryIntervalSeconds { get; set; } + [JsonPropertyName("discovery_interval_Sec")] + public int? DiscoveryIntervalSeconds { get; set; } /// /// The maximum time (in seconds) for FBM cache operations are allowed @@ -71,7 +71,7 @@ namespace VNLib.Plugins.Extensions.VNCache /// /// Retry interval in a timespan /// - internal TimeSpan RetryInterval => TimeSpan.FromSeconds(RetryIntervalSeconds!.Value); + internal TimeSpan DiscoveryInterval => TimeSpan.FromSeconds(DiscoveryIntervalSeconds!.Value); /// /// FBM Request timeout @@ -92,7 +92,7 @@ namespace VNLib.Plugins.Extensions.VNCache public Uri[] GetInitialNodeUris() { _ = InitialNodes ?? throw new InvalidOperationException("Initial nodes have not been set"); - return InitialNodes.Select(x => new Uri(x)).ToArray(); + return InitialNodes.Select(static x => new Uri(x, UriKind.Absolute)).ToArray(); } void IOnConfigValidation.Validate() @@ -102,7 +102,7 @@ namespace VNLib.Plugins.Extensions.VNCache throw new ArgumentException("Your maxium message size should be a reasonable value greater than 0", "max_message_size"); } - if (!RetryIntervalSeconds.HasValue || RetryIntervalSeconds.Value < 1) + if (!DiscoveryIntervalSeconds.HasValue || DiscoveryIntervalSeconds.Value < 1) { throw new ArgumentException("You must specify a retry interval period greater than 0", "retry_interval_sec"); } @@ -128,7 +128,7 @@ namespace VNLib.Plugins.Extensions.VNCache } //Verify http connection - if(peer.Scheme != Uri.UriSchemeHttp || peer.Scheme != Uri.UriSchemeHttps) + if(peer.Scheme != Uri.UriSchemeHttp && peer.Scheme != Uri.UriSchemeHttps) { throw new ArgumentException("You must specify an HTTP or HTTPS URI for each initial node", "initial_nodes"); } -- cgit