Skip to content

Commit

Permalink
Allow user to extend initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
roquie committed Aug 30, 2022
1 parent 23055e4 commit e10b002
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Bootloader/TemporalBridgeBootloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public function addWorkerOptions(string $worker, WorkerOptions $options): void
$this->config->modify(TemporalConfig::CONFIG, new Append('workers', $worker, $options));
}

private function initWorkflowPresetLocator(
protected function initWorkflowPresetLocator(
FactoryInterface $factory,
ClassesInterface $classes
): WorkflowPresetLocatorInterface {
Expand All @@ -92,7 +92,7 @@ private function initWorkflowPresetLocator(
);
}

private function initConfig(EnvironmentInterface $env): void
protected function initConfig(EnvironmentInterface $env): void
{
$this->config->setDefaults(
TemporalConfig::CONFIG,
Expand All @@ -105,31 +105,31 @@ private function initConfig(EnvironmentInterface $env): void
);
}

private function initWorkflowClient(TemporalConfig $config): WorkflowClientInterface
protected function initWorkflowClient(TemporalConfig $config): WorkflowClientInterface
{
return WorkflowClient::create(
ServiceClient::create($config->getAddress()),
(new ClientOptions())->withNamespace($config->getTemporalNamespace()),
);
}

private function initWorkerFactory(): WorkerFactoryInterface
protected function initWorkerFactory(): WorkerFactoryInterface
{
return new WorkerFactory(
DataConverter::createDefault(),
Goridge::create()
);
}

private function initDeclarationLocator(ClassesInterface $classes): DeclarationLocatorInterface
protected function initDeclarationLocator(ClassesInterface $classes): DeclarationLocatorInterface
{
return new \Spiral\TemporalBridge\DeclarationLocator(
$classes,
new AttributeReader()
);
}

private function initWorkersRegistry(
protected function initWorkersRegistry(
WorkerFactoryInterface $workerFactory,
FinalizerInterface $finalizer,
TemporalConfig $config
Expand Down

0 comments on commit e10b002

Please sign in to comment.