diff options
author | Dana Powers <dana.powers@rd.io> | 2015-11-29 10:00:50 +0800 |
---|---|---|
committer | Zack Dever <zack.dever@rd.io> | 2015-12-04 11:25:40 -0800 |
commit | 058567912e8d82c1da5e5ead9e30be532573a173 (patch) | |
tree | eb5cdd9d7c25729441cfa097772ca0623e4cbfe0 /kafka/protocol/metadata.py | |
parent | a85e09df89a43de5b659a0fa4ed35bec37c60e04 (diff) | |
download | kafka-python-058567912e8d82c1da5e5ead9e30be532573a173.tar.gz |
Add simple BrokerConnection class; add request.RESPONSE_TYPE class vars
Diffstat (limited to 'kafka/protocol/metadata.py')
-rw-r--r-- | kafka/protocol/metadata.py | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/kafka/protocol/metadata.py b/kafka/protocol/metadata.py index b35e7ef..810f1b8 100644 --- a/kafka/protocol/metadata.py +++ b/kafka/protocol/metadata.py @@ -2,14 +2,6 @@ from .struct import Struct from .types import Array, Int16, Int32, Schema, String -class MetadataRequest(Struct): - API_KEY = 3 - API_VERSION = 0 - SCHEMA = Schema( - ('topics', Array(String('utf-8'))) - ) - - class MetadataResponse(Struct): SCHEMA = Schema( ('brokers', Array( @@ -26,3 +18,12 @@ class MetadataResponse(Struct): ('replicas', Array(Int32)), ('isr', Array(Int32)))))) ) + + +class MetadataRequest(Struct): + API_KEY = 3 + API_VERSION = 0 + RESPONSE_TYPE = MetadataResponse + SCHEMA = Schema( + ('topics', Array(String('utf-8'))) + ) |