-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
25cbd59
commit 2e4ecab
Showing
18 changed files
with
311 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// Copyright © 2024 EPAM Systems | ||
|
||
using System.Text.Json.Serialization; | ||
|
||
namespace Epam.Kafka.Stats.Broker; | ||
|
||
/// <summary> | ||
/// Enum representing the source state of a Broker in librdkafka. | ||
/// </summary> | ||
[JsonConverter(typeof(JsonStringEnumConverter<BrokerSource>))] | ||
public enum BrokerSource | ||
{ | ||
/// <summary> | ||
/// Not available | ||
/// </summary> | ||
[JsonIgnore] | ||
None, | ||
|
||
/// <summary> | ||
/// State indicating the broker has been learned through broker metadata. | ||
/// </summary> | ||
[JsonStringEnumMemberName("learned")] | ||
Learned, | ||
|
||
/// <summary> | ||
/// State indicating the broker has been configured by the user. | ||
/// </summary> | ||
[JsonStringEnumMemberName("configured")] | ||
Configured, | ||
|
||
/// <summary> | ||
/// State indicating the broker is managed internally by the system. | ||
/// </summary> | ||
[JsonStringEnumMemberName("internal")] | ||
Internal, | ||
|
||
/// <summary> | ||
/// State indicating the broker acts as a logical broker within the Kafka cluster. | ||
/// </summary> | ||
[JsonStringEnumMemberName("logical")] | ||
Logical | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
// Copyright © 2024 EPAM Systems | ||
|
||
using System.Text.Json.Serialization; | ||
|
||
namespace Epam.Kafka.Stats.Broker; | ||
|
||
/// <summary> | ||
/// Enum representing the state of a Broker in librdkafka. | ||
/// See https://github.com/confluentinc/librdkafka/blob/master/src/rdkafka_broker.h | ||
/// </summary> | ||
[JsonConverter(typeof(JsonStringEnumConverter<BrokerState>))] | ||
public enum BrokerState | ||
{ | ||
/// <summary> | ||
/// State not available | ||
/// </summary> | ||
[JsonIgnore] | ||
None, | ||
|
||
/// <summary> | ||
/// Initial state before any connection attempts. | ||
/// </summary> | ||
[JsonStringEnumMemberName("INIT")] | ||
Init, | ||
|
||
/// <summary> | ||
/// Broker is not connected. | ||
/// </summary> | ||
[JsonStringEnumMemberName("DOWN")] | ||
Down, | ||
|
||
/// <summary> | ||
/// Broker is trying to connect. | ||
/// </summary> | ||
[JsonStringEnumMemberName("TRY_CONNECT")] | ||
TryConnect, | ||
|
||
/// <summary> | ||
/// Broker is connecting. | ||
/// </summary> | ||
[JsonStringEnumMemberName("CONNECT")] | ||
Connect, | ||
|
||
/// <summary> | ||
/// SSL handshake is underway. | ||
/// </summary> | ||
[JsonStringEnumMemberName("SSL_HANDSHAKE")] | ||
SslHandshake, | ||
|
||
/// <summary> | ||
/// Broker is using legacy authentication. | ||
/// </summary> | ||
[JsonStringEnumMemberName("AUTH_LEGACY")] | ||
AuthLegacy, | ||
|
||
/// <summary> | ||
/// Broker is operational for Kafka protocol operations. | ||
/// </summary> | ||
[JsonStringEnumMemberName("UP")] | ||
Up, | ||
|
||
/// <summary> | ||
/// Broker state is being updated. | ||
/// </summary> | ||
[JsonStringEnumMemberName("UPDATE")] | ||
Update, | ||
|
||
/// <summary> | ||
/// Broker is querying for supported API versions. | ||
/// </summary> | ||
[JsonStringEnumMemberName("APIVERSION_QUERY")] | ||
ApiVersionQuery, | ||
|
||
/// <summary> | ||
/// Authentication handshake is in progress. | ||
/// </summary> | ||
[JsonStringEnumMemberName("AUTH_HANDSHAKE")] | ||
AuthHandshake, | ||
|
||
/// <summary> | ||
/// Authentication request is being processed. | ||
/// </summary> | ||
[JsonStringEnumMemberName("AUTH_REQ")] | ||
AuthReq, | ||
|
||
/// <summary> | ||
/// Broker is re-authenticating. | ||
/// </summary> | ||
[JsonStringEnumMemberName("REAUTH")] | ||
Reauth, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
....Kafka/Stats/IdempotentProducerIdState.cs → ...ka/Stats/Eos/IdempotentProducerIdState.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...Kafka/Stats/TransactionalProducerState.cs → ...a/Stats/Eos/TransactionalProducerState.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.