diff --git a/Annotation/Target.php b/Annotation/Target.php index 045e3dd7..0042540c 100644 --- a/Annotation/Target.php +++ b/Annotation/Target.php @@ -11,4 +11,18 @@ namespace Annotation; #[\Attribute(\Attribute::TARGET_CLASS)] class Target extends Attribute { + + const WORKER = 'worker'; + const ALL = 'any'; + const PROCESS = 'process'; + const TASK = 'task'; + + + /** + * @param string $only + */ + public function __construct(public string $only = Target::ALL) + { + } + } diff --git a/Annotation/Kafka.php b/Kafka/Annotation/Kafka.php similarity index 90% rename from Annotation/Kafka.php rename to Kafka/Annotation/Kafka.php index 634ab771..29177de3 100644 --- a/Annotation/Kafka.php +++ b/Kafka/Annotation/Kafka.php @@ -1,9 +1,10 @@ get(KafkaProvider::class); $container->addConsumer($this->topic, $class);