Skip to content

Commit

Permalink
Expose some internal properties as public (#2127)
Browse files Browse the repository at this point in the history
In order to write a proper alternative to the DefaultClusterContext, we need these properties to be public
  • Loading branch information
jstnlef authored May 20, 2024
1 parent 6070c5a commit d005018
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/Proto.Cluster/Cluster.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,11 @@ public Cluster(ActorSystem system, ClusterConfig config)
/// </summary>
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<ClusterTopology>(e =>
Expand Down
4 changes: 2 additions & 2 deletions src/Proto.Cluster/Messages/Messages.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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}";

Expand Down Expand Up @@ -143,4 +143,4 @@ public static uint TopologyHash(IEnumerable<Member> members)
public partial class MemberHeartbeat : IRemotePriorityMessage
{

}
}
4 changes: 2 additions & 2 deletions src/Proto.Cluster/PidCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

namespace Proto.Cluster;

internal class PidCache
public class PidCache
{
private readonly ICollection<KeyValuePair<ClusterIdentity, PID>> _cacheCollection;
private readonly ConcurrentDictionary<ClusterIdentity, PID> _cacheDict;
Expand Down Expand Up @@ -168,4 +168,4 @@ internal int RemoveByPredicate(Func<KeyValuePair<ClusterIdentity, PID>, bool> pr

return removed;
}
}
}

0 comments on commit d005018

Please sign in to comment.