Factory interface for creating TemporalOptions asynchronously. Used with TemporalModule.registerAsync() for dynamic configuration.
@Injectable()export class TemporalConfigFactory implements TemporalOptionsFactory { constructor(private configService: ConfigService) {} createTemporalOptions(): TemporalOptions { return { connection: { address: this.configService.get('TEMPORAL_ADDRESS'), namespace: this.configService.get('TEMPORAL_NAMESPACE') }, taskQueue: this.configService.get('TEMPORAL_TASK_QUEUE') }; }} Copy
@Injectable()export class TemporalConfigFactory implements TemporalOptionsFactory { constructor(private configService: ConfigService) {} createTemporalOptions(): TemporalOptions { return { connection: { address: this.configService.get('TEMPORAL_ADDRESS'), namespace: this.configService.get('TEMPORAL_NAMESPACE') }, taskQueue: this.configService.get('TEMPORAL_TASK_QUEUE') }; }}
Factory interface for creating TemporalOptions asynchronously. Used with TemporalModule.registerAsync() for dynamic configuration.
Example