Skip to content

Commit

Permalink
Add addons
Browse files Browse the repository at this point in the history
  • Loading branch information
WyriHaximus committed Jun 16, 2024
1 parent f52a1e0 commit fc5fde9
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 8 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"description": "\ud83e\ude86 Queue attributes",
"license": "MIT",
"require": {
"php": "^8.2"
"php": "^8.2",
"mammatus/kubernetes-contracts": "dev-main"
},
"require-dev": {
"wyrihaximus/test-utilities": "^5.6"
Expand Down
61 changes: 54 additions & 7 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions src/Consumer.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,21 @@
namespace Mammatus\Queue\Attributes;

use Attribute;
use Mammatus\Kubernetes\Contracts\AddOn;

#[Attribute(Attribute::TARGET_CLASS | Attribute::IS_REPEATABLE)]
final readonly class Consumer
{
/**
* @var array<AddOn>
*/
public array $addOns;

public function __construct(
public string $queue,
public int $concurrency,
AddOn ...$addOns,
) {
$this->addOns = $addOns;
}
}

0 comments on commit fc5fde9

Please sign in to comment.