From d005018c94e4f48505e187520abf74edea71adf7 Mon Sep 17 00:00:00 2001 From: Justin LeFebvre Date: Mon, 20 May 2024 12:53:51 -0400 Subject: [PATCH] Expose some internal properties as public (#2127) In order to write a proper alternative to the DefaultClusterContext, we need these properties to be public --- src/Proto.Cluster/Cluster.cs | 6 +++--- src/Proto.Cluster/Messages/Messages.cs | 4 ++-- src/Proto.Cluster/PidCache.cs | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Proto.Cluster/Cluster.cs b/src/Proto.Cluster/Cluster.cs index 23718d8c68..7f7a270eb9 100644 --- a/src/Proto.Cluster/Cluster.cs +++ b/src/Proto.Cluster/Cluster.cs @@ -137,11 +137,11 @@ public Cluster(ActorSystem system, ClusterConfig config) /// public MemberList MemberList { get; private set; } = null!; - internal IIdentityLookup IdentityLookup { get; set; } = null!; + public IIdentityLookup IdentityLookup { get; set; } = null!; - internal IClusterProvider Provider { get; set; } = null!; + public PidCache PidCache { get; } - internal PidCache PidCache { get; } + internal IClusterProvider Provider { get; set; } = null!; private void SubscribeToTopologyEvents() => System.EventStream.Subscribe(e => diff --git a/src/Proto.Cluster/Messages/Messages.cs b/src/Proto.Cluster/Messages/Messages.cs index 3e59f29bca..08045a1fb2 100644 --- a/src/Proto.Cluster/Messages/Messages.cs +++ b/src/Proto.Cluster/Messages/Messages.cs @@ -15,7 +15,7 @@ namespace Proto.Cluster; public sealed partial class ClusterIdentity : ICustomDiagnosticMessage { - internal PID? CachedPid { get; set; } + public PID? CachedPid { get; set; } public string ToDiagnosticString() => $"{Kind}/{Identity}"; @@ -143,4 +143,4 @@ public static uint TopologyHash(IEnumerable members) public partial class MemberHeartbeat : IRemotePriorityMessage { -} \ No newline at end of file +} diff --git a/src/Proto.Cluster/PidCache.cs b/src/Proto.Cluster/PidCache.cs index 4f361f3e36..7a3e2e1790 100644 --- a/src/Proto.Cluster/PidCache.cs +++ b/src/Proto.Cluster/PidCache.cs @@ -14,7 +14,7 @@ namespace Proto.Cluster; -internal class PidCache +public class PidCache { private readonly ICollection> _cacheCollection; private readonly ConcurrentDictionary _cacheDict; @@ -168,4 +168,4 @@ internal int RemoveByPredicate(Func, bool> pr return removed; } -} \ No newline at end of file +}