feat: add ClientKind enum with IsInternal extension

This commit is contained in:
Joseph Doherty
2026-02-23 05:15:06 -05:00
parent 4b3890f046
commit 5e11785bdf
2 changed files with 39 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
namespace NATS.Server;
/// <summary>
/// Identifies the type of a client connection.
/// Maps to Go's client kind constants in client.go:45-65.
/// </summary>
public enum ClientKind
{
Client,
Router,
Gateway,
Leaf,
System,
JetStream,
Account,
}
public static class ClientKindExtensions
{
public static bool IsInternal(this ClientKind kind) =>
kind is ClientKind.System or ClientKind.JetStream or ClientKind.Account;
}