Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable allow-direct config #61

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/Stream/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class Configuration
private ?int $maxMessageSize = null;
private ?int $maxMessagesPerSubject = null;
private ?string $description = null;
private ?bool $allowDirect = null;

public function __construct(
public readonly string $name
Expand Down Expand Up @@ -193,6 +194,17 @@ public function setSubjects(array $subjects): self
return $this;
}

public function getAllowDirect(): ?bool
{
return $this->allowDirect;
}

public function setAllowDirect(?bool $allowDirect): self
{
$this->allowDirect = $allowDirect;
return $this;
}

public function toArray(): array
{
$config = [
Expand All @@ -211,6 +223,7 @@ public function toArray(): array
'retention' => $this->getRetentionPolicy(),
'storage' => $this->getStorageBackend(),
'subjects' => $this->getSubjects(),
'allow_direct' => $this->getAllowDirect(),
];

foreach ($config as $k => $v) {
Expand Down
Loading