# Path: gnsq/decorators.py
# class cached_property(object):
#     """A decorator that converts a function into a lazy property."""
# 
#     def __init__(self, func, name=None, doc=None):
#         self.__name__ = name or func.__name__
#         self.__module__ = func.__module__
#         self.__doc__ = doc or func.__doc__
#         self.func = func
# 
#     def __get__(self, obj, type=None):
#         if obj is None:
#             return self
# 
#         if self.__name__ in obj.__dict__:
#             return obj.__dict__[self.__name__]
# 
#         value = obj.__dict__[self.__name__] = self.func(obj)
#         return value
# 
# Path: gnsq/errors.py
# class NSQException(Exception):
#     pass


import blinker
from .decorators import cached_property
from .errors import NSQException
# -*- coding: utf-8 -*-
from __future__ import absolute_import


class Message(object):
    """A class representing a message received from nsqd."""
    def __init__(self, timestamp, attempts, id, body):
        self.timestamp = timestamp
        self.attempts = attempts
        self.id = id
        self.body = body
        self._has_responded = False
        self._is_async = False


# Path: gnsq/decorators.py
# class cached_property(object):
#     """A decorator that converts a function into a lazy property."""
# 
#     def __init__(self, func, name=None, doc=None):
#         self.__name__ = name or func.__name__
#         self.__module__ = func.__module__
#         self.__doc__ = doc or func.__doc__
#         self.func = func
# 
#     def __get__(self, obj, type=None):
#         if obj is None:
#             return self
# 
#         if self.__name__ in obj.__dict__:
#             return obj.__dict__[self.__name__]
# 
#         value = obj.__dict__[self.__name__] = self.func(obj)
#         return value
# 
# Path: gnsq/errors.py
# class NSQException(Exception):
#     pass


# Path: gnsq/message.py
import blinker
from .decorators import cached_property
from .errors import NSQException

# -*- coding: utf-8 -*-
from __future__ import absolute_import


class Message(object):
    """A class representing a message received from nsqd."""
    def __init__(self, timestamp, attempts, id, body):
        self.timestamp = timestamp
        self.attempts = attempts
        self.id = id
        self.body = body
        self._has_responded = False
        self._is_async = False


    @cached_property