for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Event Sourcing implementation module.
*
* @author Maksim Masiukevich <[email protected]>
* @license MIT
* @license https://opensource.org/licenses/MIT
*/
declare(strict_types = 1);
namespace ServiceBus\EventSourcingModule;
use ServiceBus\EventSourcing\AggregateId;
use ServiceBus\EventSourcing\Indexes\IndexKey;
* @internal
* @param AggregateId $id
* @return string
function createAggregateMutexKey(AggregateId $id): string
{
return \sha1(\sprintf('aggregate:%s', $id));
}
* @param IndexKey $indexKey
function createIndexMutex(IndexKey $indexKey): string
return \sha1(\sprintf('index:%s', $indexKey->valueKey));