Exemplo n.º 1
0
class AlterConfigsResponse_v0(Response):
    API_KEY = 33
    API_VERSION = 0
    SCHEMA = Schema(
        ('throttle_time_ms', Int32),
        ('resources', Array(
            ('error_code', Int16),
            ('error_message', String('utf-8')),
            ('resource_type', Int8),
            ('resource_name', String('utf-8'))))
    )
Exemplo n.º 2
0
class DescribeConfigsRequest_v1(Request):
    API_KEY = 32
    API_VERSION = 1
    RESPONSE_TYPE = DescribeConfigsResponse_v1
    SCHEMA = Schema(
        ('resources', Array(
            ('resource_type', Int8),
            ('resource_name', String('utf-8')),
            ('config_names', Array(String('utf-8'))))),
        ('include_synonyms', Boolean)
    )
Exemplo n.º 3
0
class JoinGroupRequest_v0(Request):
    API_KEY = 11
    API_VERSION = 0
    RESPONSE_TYPE = JoinGroupResponse_v0
    SCHEMA = Schema(('group', String('utf-8')), ('session_timeout', Int32),
                    ('member_id', String('utf-8')),
                    ('protocol_type', String('utf-8')),
                    ('group_protocols',
                     Array(('protocol_name', String('utf-8')),
                           ('protocol_metadata', Bytes))))
    UNKNOWN_MEMBER_ID = ''
Exemplo n.º 4
0
class ListGroupsResponse_v1(Response):
    API_KEY = 16
    API_VERSION = 1
    SCHEMA = Schema(
        ("throttle_time_ms", Int32),
        ("error_code", Int16),
        (
            "groups",
            Array(("group", String("utf-8")), ("protocol_type", String("utf-8"))),
        ),
    )
Exemplo n.º 5
0
class AlterConfigsRequest_v0(Request):
    API_KEY = 33
    API_VERSION = 0
    RESPONSE_TYPE = AlterConfigsResponse_v0
    SCHEMA = Schema(
        ('resources',
         Array(('resource_type', Int8), ('resource_name', String('utf-8')),
               ('config_entries',
                Array(('config_name', String('utf-8')),
                      ('config_value', String('utf-8')))))),
        ('validate_only', Boolean))
Exemplo n.º 6
0
class DescribeAclsRequest_v0(Request):
    API_KEY = 29
    API_VERSION = 0
    RESPONSE_TYPE = DescribeAclsResponse_v0
    SCHEMA = Schema(
        ("resource_type", Int8),
        ("resource_name", String("utf-8")),
        ("principal", String("utf-8")),
        ("host", String("utf-8")),
        ("operation", Int8),
        ("permission_type", Int8),
    )
Exemplo n.º 7
0
class DescribeClientQuotasRequest_v0(Request):
    API_KEY = 48
    API_VERSION = 0
    RESPONSE_TYPE = DescribeClientQuotasResponse_v0
    SCHEMA = Schema(
        ('components', Array(
            ('entity_type', String('utf-8')),
            ('match_type', Int8),
            ('match', String('utf-8')),
        )),
        ('strict', Boolean)
    )
Exemplo n.º 8
0
class AlterClientQuotasRequest_v0(Request):
    API_KEY = 49
    API_VERSION = 0
    RESPONSE_TYPE = AlterClientQuotasResponse_v0
    SCHEMA = Schema(('entries',
                     Array(('entity',
                            Array(('entity_type', String('utf-8')),
                                  ('entity_name', String('utf-8')))),
                           ('ops',
                            Array(('key', String('utf-8')), ('value', Float64),
                                  ('remove', Boolean))))),
                    ('validate_only', Boolean))
Exemplo n.º 9
0
class TxnOffsetCommitRequest_v0(Request):
    API_KEY = 28
    API_VERSION = 0
    RESPONSE_TYPE = TxnOffsetCommitResponse_v0
    SCHEMA = Schema(('transactional_id', String('utf-8')),
                    ('group_id', String('utf-8')), ('producer_id', Int64),
                    ('producer_epoch', Int16),
                    ('topics',
                     Array(('topic', String('utf-8')),
                           ('partitions',
                            Array(('partition', Int32), ('offset', Int64),
                                  ('metadata', String('utf-8')))))))
Exemplo n.º 10
0
class DescribeConfigsRequestV0(Request):
    """
    DescribeConfigs in Kafka Protocol
    Request serialization
    """
    API_KEY = 32
    API_VERSION = 0
    RESPONSE_TYPE = DescribeConfigsResponseV0
    SCHEMA = Schema(
        ('resources',
         Array(('resource_type', Int8), ('resource_name', String('utf-8')),
               ('config_names', Array(String('utf-8'))))))
Exemplo n.º 11
0
class OffsetFetchResponse_v0(Response):
    API_KEY = 9
    API_VERSION = 0
    SCHEMA = Schema(
        ('topics', Array(
            ('topic', String('utf-8')),
            ('partitions', Array(
                ('partition', Int32),
                ('offset', Int64),
                ('metadata', String('utf-8')),
                ('error_code', Int16)))))
    )
Exemplo n.º 12
0
class DescribeAclsRequest_v0(Request):
    API_KEY = 29
    API_VERSION = 0
    RESPONSE_TYPE = DescribeAclsResponse_v0
    SCHEMA = Schema(
        ('resource_type', Int8),
        ('resource_name', String('utf-8')),
        ('principal', String('utf-8')),
        ('host', String('utf-8')),
        ('operation', Int8),
        ('permission_type', Int8)
    )
Exemplo n.º 13
0
class AlterConfigsResponse_v0(Response):
    """
    AlterConfigs version 0 from Kafka protocol
    Response serialization
    """
    API_KEY = 33
    API_VERSION = 0
    SCHEMA = Schema(
        ('throttle_time_ms', Int32),
        ('resources',
         Array(('error_code', Int16), ('error_message', String('utf-8')),
               ('resource_type', Int8), ('resource_name', String('utf-8')))))
Exemplo n.º 14
0
class AlterClientQuotasResponse_v0(Response):
    API_KEY = 49
    API_VERSION = 0
    SCHEMA = Schema(
        ('throttle_time_ms', Int32),
        ('entries', Array(
            ('error_code', Int16),
            ('error_message', String('utf-8')),
            ('entity', Array(
                ('entity_type', String('utf-8')),
                ('entity_name', String('utf-8'))))))
    )
Exemplo n.º 15
0
class DescribeAclsResponse_v0(Response):
    API_KEY = 29
    API_VERSION = 0
    SCHEMA = Schema(
        ('throttle_time_ms', Int32), ('error_code', Int16),
        ('error_message', String('utf-8')),
        ('resources',
         Array(('resource_type', Int8), ('resource_name', String('utf-8')),
               ('acls',
                Array(('principal', String('utf-8')),
                      ('host', String('utf-8')), ('operation', Int8),
                      ('permission_type', Int8))))))
class JoinGroupResponse_v0(Response):
    API_KEY = 11
    API_VERSION = 0
    SCHEMA = Schema(
        ("error_code", Int16),
        ("generation_id", Int32),
        ("group_protocol", String("utf-8")),
        ("leader_id", String("utf-8")),
        ("member_id", String("utf-8")),
        ("members",
         Array(("member_id", String("utf-8")), ("member_metadata", Bytes))),
    )
Exemplo n.º 17
0
class OffsetCommitRequest_v0(Struct):
    API_KEY = API_KEY
    API_VERSION = 0
    SCHEMA = Schema(('group_id', String('utf-8')),
                    ('topics',
                     Array(('topic', String('utf-8')),
                           ('partitions',
                            Array(
                                ('partition', Int32),
                                ('offset', Int64),
                                ('metadata', String('utf-8')),
                            )))))
Exemplo n.º 18
0
class AddPartitionsToTxnRequest_v0(Request):
    API_KEY = 24
    API_VERSION = 0
    RESPONSE_TYPE = AddPartitionsToTxnResponse_v0
    SCHEMA = Schema(
        ('transactional_id', String('utf-8')),
        ('producer_id', Int64),
        ('producer_epoch', Int16),
        ('topics', Array(
            ('topic', String('utf-8')),
            ('partitions', Array(Int32))))
    )
Exemplo n.º 19
0
class ProduceRequest_v3(ProduceRequest):
    API_VERSION = 3
    RESPONSE_TYPE = ProduceResponse_v3
    SCHEMA = Schema(
        ('transactional_id', String('utf-8')),
        ('required_acks', Int16),
        ('timeout', Int32),
        ('topics', Array(
            ('topic', String('utf-8')),
            ('partitions', Array(
                ('partition', Int32),
                ('messages', Bytes)))))
    )
Exemplo n.º 20
0
class OffsetCommitRequest_v2(Struct):
    API_KEY = API_KEY
    API_VERSION = 2
    SCHEMA = Schema(
        ('group_id', String('utf-8')), ('group_generation_id', Int32),
        ('member_id', String('utf-8')), ('retention_time', Int64),
        ('topics',
         Array(('topic', String('utf-8')), ('partitions',
                                            Array(
                                                ('partition', Int32),
                                                ('offset', Int64),
                                                ('metadata', String('utf-8')),
                                            )))))
Exemplo n.º 21
0
class CreateTopicsResponse_v1(Response):
    API_KEY = 19
    API_VERSION = 1
    SCHEMA = Schema(
        (
            "topic_errors",
            Array(
                ("topic", String("utf-8")),
                ("error_code", Int16),
                ("error_message", String("utf-8")),
            ),
        )
    )
class SyncGroupRequest_v0(Request):
    API_KEY = 14
    API_VERSION = 0
    RESPONSE_TYPE = SyncGroupResponse_v0
    SCHEMA = Schema(
        ("group", String("utf-8")),
        ("generation_id", Int32),
        ("member_id", String("utf-8")),
        (
            "group_assignment",
            Array(("member_id", String("utf-8")), ("member_metadata", Bytes)),
        ),
    )
Exemplo n.º 23
0
class CreateAclsRequest_v0(Request):
    API_KEY = 30
    API_VERSION = 0
    RESPONSE_TYPE = CreateAclsResponse_v0
    SCHEMA = Schema(
        ('creations', Array(
            ('resource_type', Int8),
            ('resource_name', String('utf-8')),
            ('principal', String('utf-8')),
            ('host', String('utf-8')),
            ('operation', Int8),
            ('permission_type', Int8)))
    )
Exemplo n.º 24
0
class OffsetCommitRequest_v0(Request):
    API_KEY = 8
    API_VERSION = 0  # Zookeeper-backed storage
    RESPONSE_TYPE = OffsetCommitResponse_v0
    SCHEMA = Schema(
        ('consumer_group', String('utf-8')),
        ('topics', Array(
            ('topic', String('utf-8')),
            ('partitions', Array(
                ('partition', Int32),
                ('offset', Int64),
                ('metadata', String('utf-8'))))))
    )
Exemplo n.º 25
0
class CreateTopicsRequest_v0(Struct):
    API_KEY = API_KEY
    API_VERSION = 0
    SCHEMA = Schema(
        ('create_topic_requests',
         Array(('topic', String('utf-8')), ('num_partitions', Int32),
               ('replication_factor', Int16),
               ('replica_assigment',
                Array(('partition_id', Int32), ('replicas', Array(Int32)))),
               ('configs',
                Array(('config_key', String('utf-8')),
                      ('config_value', String('utf-8')))))),
        ('timeout', Int32))
Exemplo n.º 26
0
class LeaderAndIsrRequest_v1(Request):
    API_KEY = 4
    API_VERSION = 1
    RESPONSE_TYPE = LeaderAndIsrResponse_v1
    SCHEMA = Schema(
        ('controller_id', Int32), ('controller_epoch', Int32),
        ('partition_states',
         Array(('topic', String('utf-8')), ('partition', Int32),
               ('controller_epoch', Int32), ('leader', Int32),
               ('leader_epoch', Int32), ('isr', Int32), ('zk_version', Int32),
               ('replicas', Int32), ('is_new', Boolean))),
        ('live_leaders',
         Array(('id', Int32), ('host', String('utf-8')), ('port', Int32))))
Exemplo n.º 27
0
class DescribeConfigsResponse_v0(Response):
    API_KEY = 32
    API_VERSION = 0
    SCHEMA = Schema(
        ('throttle_time_ms', Int32),
        ('resources',
         Array(('error_code', Int16), ('error_message', String('utf-8')),
               ('resource_type', Int8), ('resource_name', String('utf-8')),
               ('config_entries',
                Array(('config_name', String('utf-8')),
                      ('config_value', String('utf-8')),
                      ('read_only', Boolean), ('is_default', Boolean),
                      ('is_sensitive', Boolean))))))
Exemplo n.º 28
0
class DeleteAclsRequest_v1(Request):
    API_KEY = 31
    API_VERSION = 1
    RESPONSE_TYPE = DeleteAclsResponse_v1
    SCHEMA = Schema(
        ('filters', Array(
            ('resource_type', Int8),
            ('resource_name', String('utf-8')),
            ('resource_pattern_type_filter', Int8),
            ('principal', String('utf-8')),
            ('host', String('utf-8')),
            ('operation', Int8),
            ('permission_type', Int8)))
    )
Exemplo n.º 29
0
class DescribeClientQuotasResponse_v0(Response):
    API_KEY = 48
    API_VERSION = 0
    SCHEMA = Schema(
        ('throttle_time_ms', Int32),
        ('error_code', Int16),
        ('error_message', String('utf-8')),
        ('entries',
         Array(('entity',
                Array(('entity_type', String('utf-8')),
                      ('entity_name', String('utf-8')))),
               ('values', Array(('name', String('utf-8')),
                                ('value', Float64))))),
    )
Exemplo n.º 30
0
class CreateTopicsRequest_v1(Request):
    API_KEY = 19
    API_VERSION = 1
    RESPONSE_TYPE = CreateTopicsResponse_v1
    SCHEMA = Schema(
        ('create_topic_requests',
         Array(('topic', String('utf-8')), ('num_partitions', Int32),
               ('replication_factor', Int16),
               ('replica_assignment',
                Array(('partition_id', Int32), ('replicas', Array(Int32)))),
               ('configs',
                Array(('config_key', String('utf-8')),
                      ('config_value', String('utf-8')))))),
        ('timeout', Int32), ('validate_only', Boolean))