You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
486 B
31 lines
486 B
from __future__ import absolute_import
|
|
|
|
import abc
|
|
|
|
|
|
class Serializer(object):
|
|
__meta__ = abc.ABCMeta
|
|
|
|
def __init__(self, **config):
|
|
pass
|
|
|
|
@abc.abstractmethod
|
|
def serialize(self, topic, value):
|
|
pass
|
|
|
|
def close(self):
|
|
pass
|
|
|
|
|
|
class Deserializer(object):
|
|
__meta__ = abc.ABCMeta
|
|
|
|
def __init__(self, **config):
|
|
pass
|
|
|
|
@abc.abstractmethod
|
|
def deserialize(self, topic, bytes_):
|
|
pass
|
|
|
|
def close(self):
|
|
pass
|