Ejemplo n.º 1
0
def load(context, path, callback):
    def callback_wrapper(result):
        r = LoaderResult()
        if result is not None:
            r.successful = True
            r.buffer = result
        else:
            r.error = LoaderResult.ERROR_NOT_FOUND
            r.successful = False

        callback(r)

    storage = Storage(context)
    storage.get(path, callback_wrapper)
Ejemplo n.º 2
0
        def topic(self):
            config = Config(HBASE_STORAGE_TABLE=self.parent.table,
                            HBASE_STORAGE_SERVER_PORT=9090)
            storage = Storage(
                Context(config=config, server=get_server('ACME-SEC')))

            storage.put(IMAGE_URL % '2', IMAGE_BYTES)
            return storage.get(IMAGE_URL % '2')
Ejemplo n.º 3
0
        def topic(self):
            config = Config(HBASE_STORAGE_TABLE=self.parent.table,HBASE_STORAGE_SERVER_PORT=9090)
            storage = Storage(Context(config=config, server=get_server('ACME-SEC')))

            storage.put(IMAGE_URL % '2', IMAGE_BYTES)
            return storage.get(IMAGE_URL % '2')
Ejemplo n.º 4
0
def load(context, path, callback):
    storage = Storage(context)
    callback(storage.get(path))
Ejemplo n.º 5
0
def load(context, path, callback):
    storage = Storage(context)
    callback(storage.get(path))