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

[Feature]: Add exec command args for xlinectl watch command #824

Open
1 task done
Phoenix500526 opened this issue May 16, 2024 · 3 comments
Open
1 task done

[Feature]: Add exec command args for xlinectl watch command #824

Phoenix500526 opened this issue May 16, 2024 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@Phoenix500526
Copy link
Collaborator

Description about the feature

The etcdctl provides the exec-command arg for the watch command. Therefore, when you want to execute some commands after triggered by watch command, you can use one-line command, like ./etcdctl watch foo -- sh -c "env | grep ETCD_WATCH_". I think this way is more user-friendly.

So far, the xlinectl doesn't support the exec command args for the watch command. I think it's not hard to implement. I leave an issue here to track. Please feel free to take this issue if you are interested in it. And please let me know if you need any help or more information.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@Phoenix500526 Phoenix500526 added the enhancement New feature or request label May 16, 2024
Copy link

👋 Thanks for opening this issue!

Reply with the following command on its own line to get help or engage:

  • /contributing-agreement : to print Contributing Agreements.
  • /assignme : to assign this issue to you.

@Phoenix500526 Phoenix500526 added the good first issue Good for newcomers label May 16, 2024
@panwarharsh15
Copy link

Hey, i don't understand your issue , can you explain what problem are you facing?

@Phoenix500526
Copy link
Collaborator Author

Hi, @panwarharsh15 ! Here is an etcdctl watch command example:

./etcdctl watch foo -- sh -c "env | grep ETCD_WATCH_"

# PUT
# foo
# bar
# ETCD_WATCH_REVISION=11
# ETCD_WATCH_KEY="foo"
# ETCD_WATCH_EVENT_TYPE="PUT"
# ETCD_WATCH_VALUE="bar"

We can split this command ./etcdctl watch foo -- sh -c "env | grep ETCD_WATCH_" by -- into two parts: one is ./etcdctl watch foo, and the other part is a shell command: env | grep ETCD_WATCH_". It indicates that execute the watch command ./etcdctl watch foo and perform the shell command env | grep ETCD_WATCH_ when the watch command is triggered.

And currently, the watch sub-command in xlinectl doesn't support this way. We can only perform xlinectl watch foo without -- sh -c "env | grep ETCD_WATCH_".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants