Archive: Namaste PHP AMQP framework v1.0 (2017-2020)

952 days continuous production uptime, 40k+ tp/s single node.
Original corpo Bitbucket history not included — clean archive commit.
This commit is contained in:
2026-04-05 09:49:30 -07:00
commit 373ebc8c93
1284 changed files with 409372 additions and 0 deletions

35
stubs/testCacheMapOut.php Normal file
View File

@@ -0,0 +1,35 @@
<?php
/**
* test stub for testing the cacheMapOut method
*
*/
// load the namaste environment
require_once(dirname(__DIR__) . '/config/sneakerstrap.inc');
// build a broker request to fetch 10 random records
$meta = [
META_TEMPLATE => TEMPLATE_CLASS_TEST_MONGO,
META_CLIENT => CLIENT_SYSTEM,
META_CLIENT_IP => STRING_SESSION_HOME,
META_EVENT_GUID => guid(), // simulate a broker event by generating the event guid
// META_LIMIT => 10
];
$payload = [
BROKER_REQUEST => BROKER_REQUEST_FETCH,
BROKER_DATA => [ STRING_QUERY_DATA => null],
BROKER_META_DATA => $meta
];
$errors = [];
$ret = validateMetaData($payload, $errors);
$obj = new gacFactory($meta, FACTORY_EVENT_NEW_CLASS, '', $errors);
/** @var gacMongoDB $widget */
$widget = $obj->widget;
$widget->_fetchRecords([]);
if (!$widget->status)
exit(ERROR_PDO_FETCH);
if (!gasCache::mapOutboundPayload($widget, $errors))
var_export($errors);
else
var_export($widget->getCK());