Skip to content

Commit

Permalink
Merge pull request #35 from roquie/patch-1
Browse files Browse the repository at this point in the history
Allow user to extend initialization
  • Loading branch information
butschster committed Aug 30, 2022
2 parents 2ed452e + e10b002 commit b5896ee
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 @@ -82,7 +82,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 @@ -93,7 +93,7 @@ private function initWorkflowPresetLocator(
);
}

private function initConfig(EnvironmentInterface $env): void
protected function initConfig(EnvironmentInterface $env): void
{
$this->config->setDefaults(
TemporalConfig::CONFIG,
Expand All @@ -106,31 +106,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 b5896ee

Please sign in to comment.