-
Notifications
You must be signed in to change notification settings - Fork 4
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
bbe7e2e
commit 1244be0
Showing
150 changed files
with
6,699 additions
and
72 deletions.
There are no files selected for viewing
Empty file.
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,7 @@ | ||
from .request import AddRaftVoterRequest | ||
from .response import AddRaftVoterResponse | ||
|
||
__all__ = ( | ||
"AddRaftVoterRequest", | ||
"AddRaftVoterResponse", | ||
) |
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,48 @@ | ||
""" | ||
Generated from ``clients/src/main/resources/common/message/AddRaftVoterRequest.json``. | ||
""" | ||
|
||
import uuid | ||
|
||
from dataclasses import dataclass | ||
from dataclasses import field | ||
from typing import ClassVar | ||
|
||
from kio.schema.request_header.v2.header import RequestHeader | ||
from kio.static.constants import EntityType | ||
from kio.static.primitive import i16 | ||
from kio.static.primitive import i32 | ||
from kio.static.primitive import i32Timedelta | ||
from kio.static.primitive import u16 | ||
|
||
|
||
@dataclass(frozen=True, slots=True, kw_only=True) | ||
class Listener: | ||
__type__: ClassVar = EntityType.nested | ||
__version__: ClassVar[i16] = i16(0) | ||
__flexible__: ClassVar[bool] = True | ||
__api_key__: ClassVar[i16] = i16(80) | ||
__header_schema__: ClassVar[type[RequestHeader]] = RequestHeader | ||
name: str = field(metadata={"kafka_type": "string"}) | ||
"""The name of the endpoint""" | ||
host: str = field(metadata={"kafka_type": "string"}) | ||
"""The hostname""" | ||
port: u16 = field(metadata={"kafka_type": "uint16"}) | ||
"""The port""" | ||
|
||
|
||
@dataclass(frozen=True, slots=True, kw_only=True) | ||
class AddRaftVoterRequest: | ||
__type__: ClassVar = EntityType.request | ||
__version__: ClassVar[i16] = i16(0) | ||
__flexible__: ClassVar[bool] = True | ||
__api_key__: ClassVar[i16] = i16(80) | ||
__header_schema__: ClassVar[type[RequestHeader]] = RequestHeader | ||
cluster_id: str | None = field(metadata={"kafka_type": "string"}) | ||
timeout: i32Timedelta = field(metadata={"kafka_type": "timedelta_i32"}) | ||
voter_id: i32 = field(metadata={"kafka_type": "int32"}) | ||
"""The replica id of the voter getting added to the topic partition""" | ||
voter_directory_id: uuid.UUID | None = field(metadata={"kafka_type": "uuid"}) | ||
"""The directory id of the voter getting added to the topic partition""" | ||
listeners: tuple[Listener, ...] | ||
"""The endpoints that can be used to communicate with the voter""" |
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,28 @@ | ||
""" | ||
Generated from ``clients/src/main/resources/common/message/AddRaftVoterResponse.json``. | ||
""" | ||
|
||
from dataclasses import dataclass | ||
from dataclasses import field | ||
from typing import ClassVar | ||
|
||
from kio.schema.errors import ErrorCode | ||
from kio.schema.response_header.v1.header import ResponseHeader | ||
from kio.static.constants import EntityType | ||
from kio.static.primitive import i16 | ||
from kio.static.primitive import i32Timedelta | ||
|
||
|
||
@dataclass(frozen=True, slots=True, kw_only=True) | ||
class AddRaftVoterResponse: | ||
__type__: ClassVar = EntityType.response | ||
__version__: ClassVar[i16] = i16(0) | ||
__flexible__: ClassVar[bool] = True | ||
__api_key__: ClassVar[i16] = i16(80) | ||
__header_schema__: ClassVar[type[ResponseHeader]] = ResponseHeader | ||
throttle_time: i32Timedelta = field(metadata={"kafka_type": "timedelta_i32"}) | ||
"""The duration in milliseconds for which the request was throttled due to a quota violation, or zero if the request did not violate any quota.""" | ||
error_code: ErrorCode = field(metadata={"kafka_type": "error_code"}) | ||
"""The error code, or 0 if there was no error""" | ||
error_message: str | None = field(metadata={"kafka_type": "string"}) | ||
"""The error message, or null if there was no error.""" |
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,7 @@ | ||
from .request import ApiVersionsRequest | ||
from .response import ApiVersionsResponse | ||
|
||
__all__ = ( | ||
"ApiVersionsRequest", | ||
"ApiVersionsResponse", | ||
) |
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,24 @@ | ||
""" | ||
Generated from ``clients/src/main/resources/common/message/ApiVersionsRequest.json``. | ||
""" | ||
|
||
from dataclasses import dataclass | ||
from dataclasses import field | ||
from typing import ClassVar | ||
|
||
from kio.schema.request_header.v2.header import RequestHeader | ||
from kio.static.constants import EntityType | ||
from kio.static.primitive import i16 | ||
|
||
|
||
@dataclass(frozen=True, slots=True, kw_only=True) | ||
class ApiVersionsRequest: | ||
__type__: ClassVar = EntityType.request | ||
__version__: ClassVar[i16] = i16(4) | ||
__flexible__: ClassVar[bool] = True | ||
__api_key__: ClassVar[i16] = i16(18) | ||
__header_schema__: ClassVar[type[RequestHeader]] = RequestHeader | ||
client_software_name: str = field(metadata={"kafka_type": "string"}) | ||
"""The name of the client.""" | ||
client_software_version: str = field(metadata={"kafka_type": "string"}) | ||
"""The version of the client.""" |
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,90 @@ | ||
""" | ||
Generated from ``clients/src/main/resources/common/message/ApiVersionsResponse.json``. | ||
""" | ||
|
||
from dataclasses import dataclass | ||
from dataclasses import field | ||
from typing import ClassVar | ||
|
||
from kio.schema.errors import ErrorCode | ||
from kio.schema.response_header.v0.header import ResponseHeader | ||
from kio.static.constants import EntityType | ||
from kio.static.primitive import i16 | ||
from kio.static.primitive import i32Timedelta | ||
from kio.static.primitive import i64 | ||
|
||
|
||
@dataclass(frozen=True, slots=True, kw_only=True) | ||
class ApiVersion: | ||
__type__: ClassVar = EntityType.nested | ||
__version__: ClassVar[i16] = i16(4) | ||
__flexible__: ClassVar[bool] = True | ||
__api_key__: ClassVar[i16] = i16(18) | ||
__header_schema__: ClassVar[type[ResponseHeader]] = ResponseHeader | ||
api_key: i16 = field(metadata={"kafka_type": "int16"}) | ||
"""The API index.""" | ||
min_version: i16 = field(metadata={"kafka_type": "int16"}) | ||
"""The minimum supported version, inclusive.""" | ||
max_version: i16 = field(metadata={"kafka_type": "int16"}) | ||
"""The maximum supported version, inclusive.""" | ||
|
||
|
||
@dataclass(frozen=True, slots=True, kw_only=True) | ||
class SupportedFeatureKey: | ||
__type__: ClassVar = EntityType.nested | ||
__version__: ClassVar[i16] = i16(4) | ||
__flexible__: ClassVar[bool] = True | ||
__api_key__: ClassVar[i16] = i16(18) | ||
__header_schema__: ClassVar[type[ResponseHeader]] = ResponseHeader | ||
name: str = field(metadata={"kafka_type": "string"}) | ||
"""The name of the feature.""" | ||
min_version: i16 = field(metadata={"kafka_type": "int16"}) | ||
"""The minimum supported version for the feature.""" | ||
max_version: i16 = field(metadata={"kafka_type": "int16"}) | ||
"""The maximum supported version for the feature.""" | ||
|
||
|
||
@dataclass(frozen=True, slots=True, kw_only=True) | ||
class FinalizedFeatureKey: | ||
__type__: ClassVar = EntityType.nested | ||
__version__: ClassVar[i16] = i16(4) | ||
__flexible__: ClassVar[bool] = True | ||
__api_key__: ClassVar[i16] = i16(18) | ||
__header_schema__: ClassVar[type[ResponseHeader]] = ResponseHeader | ||
name: str = field(metadata={"kafka_type": "string"}) | ||
"""The name of the feature.""" | ||
max_version_level: i16 = field(metadata={"kafka_type": "int16"}) | ||
"""The cluster-wide finalized max version level for the feature.""" | ||
min_version_level: i16 = field(metadata={"kafka_type": "int16"}) | ||
"""The cluster-wide finalized min version level for the feature.""" | ||
|
||
|
||
@dataclass(frozen=True, slots=True, kw_only=True) | ||
class ApiVersionsResponse: | ||
__type__: ClassVar = EntityType.response | ||
__version__: ClassVar[i16] = i16(4) | ||
__flexible__: ClassVar[bool] = True | ||
__api_key__: ClassVar[i16] = i16(18) | ||
__header_schema__: ClassVar[type[ResponseHeader]] = ResponseHeader | ||
error_code: ErrorCode = field(metadata={"kafka_type": "error_code"}) | ||
"""The top-level error code.""" | ||
api_keys: tuple[ApiVersion, ...] | ||
"""The APIs supported by the broker.""" | ||
throttle_time: i32Timedelta = field(metadata={"kafka_type": "timedelta_i32"}) | ||
"""The duration in milliseconds for which the request was throttled due to a quota violation, or zero if the request did not violate any quota.""" | ||
supported_features: tuple[SupportedFeatureKey, ...] = field( | ||
metadata={"tag": 0}, default=() | ||
) | ||
"""Features supported by the broker. Note: in v0-v3, features with MinSupportedVersion = 0 are omitted.""" | ||
finalized_features_epoch: i64 = field( | ||
metadata={"kafka_type": "int64", "tag": 1}, default=i64(-1) | ||
) | ||
"""The monotonically increasing epoch for the finalized features information. Valid values are >= 0. A value of -1 is special and represents unknown epoch.""" | ||
finalized_features: tuple[FinalizedFeatureKey, ...] = field( | ||
metadata={"tag": 2}, default=() | ||
) | ||
"""List of cluster-wide finalized features. The information is valid only if FinalizedFeaturesEpoch >= 0.""" | ||
zk_migration_ready: bool = field( | ||
metadata={"kafka_type": "bool", "tag": 3}, default=False | ||
) | ||
"""Set by a KRaft controller if the required configurations for ZK migration are present""" |
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,7 @@ | ||
from .request import BeginQuorumEpochRequest | ||
from .response import BeginQuorumEpochResponse | ||
|
||
__all__ = ( | ||
"BeginQuorumEpochRequest", | ||
"BeginQuorumEpochResponse", | ||
) |
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,76 @@ | ||
""" | ||
Generated from ``clients/src/main/resources/common/message/BeginQuorumEpochRequest.json``. | ||
""" | ||
|
||
import uuid | ||
|
||
from dataclasses import dataclass | ||
from dataclasses import field | ||
from typing import ClassVar | ||
|
||
from kio.schema.request_header.v2.header import RequestHeader | ||
from kio.schema.types import BrokerId | ||
from kio.schema.types import TopicName | ||
from kio.static.constants import EntityType | ||
from kio.static.primitive import i16 | ||
from kio.static.primitive import i32 | ||
from kio.static.primitive import u16 | ||
|
||
|
||
@dataclass(frozen=True, slots=True, kw_only=True) | ||
class PartitionData: | ||
__type__: ClassVar = EntityType.nested | ||
__version__: ClassVar[i16] = i16(1) | ||
__flexible__: ClassVar[bool] = True | ||
__api_key__: ClassVar[i16] = i16(53) | ||
__header_schema__: ClassVar[type[RequestHeader]] = RequestHeader | ||
partition_index: i32 = field(metadata={"kafka_type": "int32"}) | ||
"""The partition index""" | ||
voter_directory_id: uuid.UUID | None = field(metadata={"kafka_type": "uuid"}) | ||
"""The directory id of the receiving replica""" | ||
leader_id: BrokerId = field(metadata={"kafka_type": "int32"}) | ||
"""The ID of the newly elected leader""" | ||
leader_epoch: i32 = field(metadata={"kafka_type": "int32"}) | ||
"""The epoch of the newly elected leader""" | ||
|
||
|
||
@dataclass(frozen=True, slots=True, kw_only=True) | ||
class TopicData: | ||
__type__: ClassVar = EntityType.nested | ||
__version__: ClassVar[i16] = i16(1) | ||
__flexible__: ClassVar[bool] = True | ||
__api_key__: ClassVar[i16] = i16(53) | ||
__header_schema__: ClassVar[type[RequestHeader]] = RequestHeader | ||
topic_name: TopicName = field(metadata={"kafka_type": "string"}) | ||
"""The topic name""" | ||
partitions: tuple[PartitionData, ...] | ||
|
||
|
||
@dataclass(frozen=True, slots=True, kw_only=True) | ||
class LeaderEndpoint: | ||
__type__: ClassVar = EntityType.nested | ||
__version__: ClassVar[i16] = i16(1) | ||
__flexible__: ClassVar[bool] = True | ||
__api_key__: ClassVar[i16] = i16(53) | ||
__header_schema__: ClassVar[type[RequestHeader]] = RequestHeader | ||
name: str = field(metadata={"kafka_type": "string"}) | ||
"""The name of the endpoint""" | ||
host: str = field(metadata={"kafka_type": "string"}) | ||
"""The node's hostname""" | ||
port: u16 = field(metadata={"kafka_type": "uint16"}) | ||
"""The node's port""" | ||
|
||
|
||
@dataclass(frozen=True, slots=True, kw_only=True) | ||
class BeginQuorumEpochRequest: | ||
__type__: ClassVar = EntityType.request | ||
__version__: ClassVar[i16] = i16(1) | ||
__flexible__: ClassVar[bool] = True | ||
__api_key__: ClassVar[i16] = i16(53) | ||
__header_schema__: ClassVar[type[RequestHeader]] = RequestHeader | ||
cluster_id: str | None = field(metadata={"kafka_type": "string"}, default=None) | ||
voter_id: BrokerId = field(metadata={"kafka_type": "int32"}, default=BrokerId(-1)) | ||
"""The replica id of the voter receiving the request""" | ||
topics: tuple[TopicData, ...] | ||
leader_endpoints: tuple[LeaderEndpoint, ...] | ||
"""Endpoints for the leader""" |
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,73 @@ | ||
""" | ||
Generated from ``clients/src/main/resources/common/message/BeginQuorumEpochResponse.json``. | ||
""" | ||
|
||
from dataclasses import dataclass | ||
from dataclasses import field | ||
from typing import ClassVar | ||
|
||
from kio.schema.errors import ErrorCode | ||
from kio.schema.response_header.v1.header import ResponseHeader | ||
from kio.schema.types import BrokerId | ||
from kio.schema.types import TopicName | ||
from kio.static.constants import EntityType | ||
from kio.static.primitive import i16 | ||
from kio.static.primitive import i32 | ||
from kio.static.primitive import u16 | ||
|
||
|
||
@dataclass(frozen=True, slots=True, kw_only=True) | ||
class PartitionData: | ||
__type__: ClassVar = EntityType.nested | ||
__version__: ClassVar[i16] = i16(1) | ||
__flexible__: ClassVar[bool] = True | ||
__api_key__: ClassVar[i16] = i16(53) | ||
__header_schema__: ClassVar[type[ResponseHeader]] = ResponseHeader | ||
partition_index: i32 = field(metadata={"kafka_type": "int32"}) | ||
"""The partition index.""" | ||
error_code: ErrorCode = field(metadata={"kafka_type": "error_code"}) | ||
leader_id: BrokerId = field(metadata={"kafka_type": "int32"}) | ||
"""The ID of the current leader or -1 if the leader is unknown.""" | ||
leader_epoch: i32 = field(metadata={"kafka_type": "int32"}) | ||
"""The latest known leader epoch""" | ||
|
||
|
||
@dataclass(frozen=True, slots=True, kw_only=True) | ||
class TopicData: | ||
__type__: ClassVar = EntityType.nested | ||
__version__: ClassVar[i16] = i16(1) | ||
__flexible__: ClassVar[bool] = True | ||
__api_key__: ClassVar[i16] = i16(53) | ||
__header_schema__: ClassVar[type[ResponseHeader]] = ResponseHeader | ||
topic_name: TopicName = field(metadata={"kafka_type": "string"}) | ||
"""The topic name.""" | ||
partitions: tuple[PartitionData, ...] | ||
|
||
|
||
@dataclass(frozen=True, slots=True, kw_only=True) | ||
class NodeEndpoint: | ||
__type__: ClassVar = EntityType.nested | ||
__version__: ClassVar[i16] = i16(1) | ||
__flexible__: ClassVar[bool] = True | ||
__api_key__: ClassVar[i16] = i16(53) | ||
__header_schema__: ClassVar[type[ResponseHeader]] = ResponseHeader | ||
node_id: BrokerId = field(metadata={"kafka_type": "int32"}) | ||
"""The ID of the associated node""" | ||
host: str = field(metadata={"kafka_type": "string"}) | ||
"""The node's hostname""" | ||
port: u16 = field(metadata={"kafka_type": "uint16"}) | ||
"""The node's port""" | ||
|
||
|
||
@dataclass(frozen=True, slots=True, kw_only=True) | ||
class BeginQuorumEpochResponse: | ||
__type__: ClassVar = EntityType.response | ||
__version__: ClassVar[i16] = i16(1) | ||
__flexible__: ClassVar[bool] = True | ||
__api_key__: ClassVar[i16] = i16(53) | ||
__header_schema__: ClassVar[type[ResponseHeader]] = ResponseHeader | ||
error_code: ErrorCode = field(metadata={"kafka_type": "error_code"}) | ||
"""The top level error code.""" | ||
topics: tuple[TopicData, ...] | ||
node_endpoints: tuple[NodeEndpoint, ...] = field(metadata={"tag": 0}, default=()) | ||
"""Endpoints for all leaders enumerated in PartitionData""" |
Oops, something went wrong.