Interface: TemporalOptionsFactory
Defined in: src/interfaces.ts:500
Factory interface for creating TemporalOptions asynchronously. Used with TemporalModule.registerAsync() for dynamic configuration.
Example
@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')
};
}
}
Methods
createTemporalOptions()
createTemporalOptions():
TemporalOptions|Promise<TemporalOptions>
Defined in: src/interfaces.ts:501
Returns
TemporalOptions | Promise<TemporalOptions>