Optionalcontext?: IReadableContextYou can pass IReadableContext that will be used by context-aware adapters.
OptionalcreateSlotId?: Invokable<[], string>You can pass your slot id generator function.
OptionaldefaultRefreshTime?: ITimeSpanThe default refresh time used in the ISemaphore refresh method.
import { TimeSpan } from "@daiso-tech/core/time-span";
TimeSpan.fromMinutes(5);
OptionaldefaultTtl?: ITimeSpan | nullYou can decide the default ttl value for ISemaphore expiration. If null is passed then no ttl will be used by default.
Optionalserde?: OneOrMore<ISerderRegister>You can pass an ISerderRegister instance to the SemaphoreFactory to register the semaphore's serialization and deserialization logic for the provided adapter.
OptionalserdeTransformerName?: stringThe serde transformer name used to identify semaphore serializer and deserializer adapters when there are adapters with the same name.
Base configuration shared by all
SemaphoreFactoryvariants.IMPORT_PATH:
"@daiso-tech/core/semaphore"