diff --git a/src/Elastic.Elasticsearch.Ephemeral/IEphemeralCluster.cs b/src/Elastic.Elasticsearch.Ephemeral/IEphemeralCluster.cs index a383389..d0185a4 100644 --- a/src/Elastic.Elasticsearch.Ephemeral/IEphemeralCluster.cs +++ b/src/Elastic.Elasticsearch.Ephemeral/IEphemeralCluster.cs @@ -8,7 +8,7 @@ namespace Elastic.Elasticsearch.Ephemeral { - public interface IEphemeralCluster + public interface IEphemeralCluster : ICluster { ICollection NodesUris(string hostName = null); string GetCacheFolderName(); diff --git a/src/Elastic.Elasticsearch.Managed/ClusterBase.cs b/src/Elastic.Elasticsearch.Managed/ClusterBase.cs index 8f8f28c..110bf31 100644 --- a/src/Elastic.Elasticsearch.Managed/ClusterBase.cs +++ b/src/Elastic.Elasticsearch.Managed/ClusterBase.cs @@ -17,14 +17,32 @@ namespace Elastic.Elasticsearch.Managed { - public interface ICluster : IDisposable - where TConfiguration : IClusterConfiguration + public interface ICluster { + /// + /// Whether known proxies were detected as running during startup + /// + DetectedProxySoftware DetectedProxy { get; } + + /// A friendly name for this cluster, derived from the implementation name string ClusterMoniker { get; } - TConfiguration ClusterConfiguration { get; } + + /// INodeFileSystem FileSystem { get; } + + /// Indicating if this cluster was started correctly bool Started { get; } + + /// + /// The collection of 's that make up the cluster + /// ReadOnlyCollection Nodes { get; } + } + + public interface ICluster : ICluster,IDisposable + where TConfiguration : IClusterConfiguration + { + TConfiguration ClusterConfiguration { get; } IConsoleLineHandler Writer { get; } IDisposable Start(); @@ -32,11 +50,6 @@ public interface ICluster : IDisposable IDisposable Start(TimeSpan waitForStarted); IDisposable Start(IConsoleLineHandler writer, TimeSpan waitForStarted); - - /// - /// Whether known proxies were detected as running during startup - /// - DetectedProxySoftware DetectedProxy { get; } } diff --git a/src/Elastic.Elasticsearch.Xunit/XunitClusterExtensions.cs b/src/Elastic.Elasticsearch.Xunit/XunitClusterExtensions.cs index a00a1e8..5472d20 100644 --- a/src/Elastic.Elasticsearch.Xunit/XunitClusterExtensions.cs +++ b/src/Elastic.Elasticsearch.Xunit/XunitClusterExtensions.cs @@ -13,8 +13,7 @@ namespace Elastic.Elasticsearch.Xunit /// public static class XunitClusterExtensions { - private static readonly ConcurrentDictionary Clients = - new ConcurrentDictionary(); + private static readonly ConcurrentDictionary Clients = new(); /// /// Gets a client for the cluster if one exists, or creates a new client if one doesn't.