import { getRedisUrl } from '../utils/utils.js';
import { Locking } from '../utils/lock/locking.js';
import { RedisKVStore } from '../utils/kvstore/RedisStore.js';
import { InMemoryKVStore } from '../utils/kvstore/InMemoryStore.js';
export const locking = await (async () => {
    let store;
    const url = getRedisUrl();
    if (url) {
        store = new RedisKVStore(url);
        await store.connect();
    }
    else {
        store = new InMemoryKVStore();
    }
    return new Locking(store);
})();
//# sourceMappingURL=locking.js.map