From a85e09df89a43de5b659a0fa4ed35bec37c60e04 Mon Sep 17 00:00:00 2001 From: Dana Powers Date: Sat, 28 Nov 2015 19:41:06 +0800 Subject: Rework protocol type definition: AbstractType, Schema, Struct --- kafka/protocol/abstract.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 kafka/protocol/abstract.py (limited to 'kafka/protocol/abstract.py') diff --git a/kafka/protocol/abstract.py b/kafka/protocol/abstract.py new file mode 100644 index 0000000..9c53c8c --- /dev/null +++ b/kafka/protocol/abstract.py @@ -0,0 +1,13 @@ +import abc + + +class AbstractType(object): + __metaclass__ = abc.ABCMeta + + @abc.abstractmethod + def encode(cls, value): + pass + + @abc.abstractmethod + def decode(cls, data): + pass -- cgit v1.2.1