Skip to content

Commit

Permalink
feat(cli/event): Implement promisc flag
Browse files Browse the repository at this point in the history
We have API promisc flag for pub/sub events, and it is
useful to have it available in cli too, to listen for all
events on api instance.

Signed-off-by: Denys Fedoryshchenko <[email protected]>
  • Loading branch information
nuclearcat committed Nov 14, 2024
1 parent df3108f commit e329d90
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions kernelci/cli/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,14 @@ def kci_event():

@kci_event.command(secrets=True)
@click.argument('channel')
@click.option('--promisc', help="Subscribe to all users", is_flag=True)
@Args.config
@Args.api
@catch_error
def subscribe(config, api, channel, secrets):
def subscribe(config, api, channel, secrets, promisc):
"""Subscribe to a Pub/Sub channel"""
api = get_api(config, api, secrets)
sub_id = api.subscribe(channel)
sub_id = api.subscribe(channel, promisc)
click.echo(sub_id)


Expand Down

0 comments on commit e329d90

Please sign in to comment.