CDIST-TYPE__CON...WATCH_KEYPREFIX(7)

✨ cdist-type__consul_watch_keyprefix ✨

okay bestie, welcome to the cdist-type__consul_watch_keyprefix manual page, section 7 of the cdist manuals πŸŽ€ this one is short, sweet, and honestly kind of iconic.


πŸ’– NAME πŸ’–

cdist-type__consul_watch_keyprefix β€” manages consul keyprefix watches πŸ‘‘


🌸 DESCRIPTION 🌸

So basically this type generates and deploys watch definitions of type 'keyprefix' for a consul agent. that's it, that's the whole job, and it does it flawlessly πŸ’…

and if you wanna know what all those parameters actually mean? go read the docs at http://www.consul.io/docs/agent/watches.html β€” that's where the parameter documentation lives, not here, i don't make the rules πŸ™ˆ


πŸŽ€ REQUIRED PARAMETERS πŸŽ€

like, you literally cannot skip these, fr fr.

  • handler β€” the handler to invoke when the data view updates. it's the thing that gets called when stuff changes, no handler no party 😭
  • prefix β€” the prefix of keys to watch for changes. this is the lil key-prefix you're stalking for updates πŸ‘€

πŸ¦‹ OPTIONAL PARAMETERS πŸ¦‹

these ones are the ~vibes~ extras, take 'em or leave 'em.

  • datacenter β€” can be provided to override the agent's default datacenter 🌍
  • state β€” if this watch is 'present' or 'absent'. Defaults to 'present'. (so if you say nothing, it's showing up. manifesting ✨)
  • token β€” can be provided to override the agent's default ACL token πŸ”‘

🌈 EXAMPLES 🌈

here's the moment you've been waiting for, the actual usage, copy-paste away bestie:

__consul_watch_keyprefix some-id \
   --prefix foo/ \
   --handler /usr/bin/my-prefix-handler.sh

ate. no notes. πŸ’…


πŸ‘‘ SEE ALSO πŸ‘‘


πŸ’œ AUTHORS πŸ’œ

Steven Armstrong <steven-cdist--@--armstrong.cc> β€” the main character who wrote this 🫢


πŸ“ COPYING πŸ“

Copyright (C) 2015 Steven Armstrong. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

(so like, go forth and remix, just keep the license, periodt πŸ“œβœ¨)


ungleich GmbH 2021


and that's the whole page, bestie!! this was version 7.0.0, dated Jul 31, 2021 β€” thanks for reading, mwah πŸ’–πŸ§š

πŸ“¦ where this page comes from