Net::Etcd::Watch
Watch watches for events happening or that have happened. Both input and output are streams; the input stream is for creating and canceling watchers and the output stream sends events. One watch RPC can watch on multiple key ranges, streaming events for several watches at once. The entire event history can be watched starting from the last compaction revision.
key is the first key for the range. If range_end is not given, the request only looks up key. the key is encoded with base64. type bytes
range_end is the end of the range [key, range_end) to watch. If range_end is not given, only the key argument is watched. If range_end is equal to '\0', all keys greater than or equal to the key argument are watched.
start_revision is an optional revision to watch from (inclusive). No start_revision is "now". int64
progress_notify is set so that the etcd server will periodically send a WatchResponse with no events to the new watcher if there are no recent events. It is useful when clients wish to recover a disconnected watcher starting from a recent known revision. The etcd server may decide how often it will send notifications based on current load.
filter out put event. filter out delete event. filters filter the events at server side before it sends back to the watcher. Options: - NOPUT: filter out put event. (default) - NODELETE: filter out delete event.
If prev_kv is set, created watcher gets the previous KV before the event happens. If the previous KV is already compacted, nothing will be returned.
watch_id is the watcher id to cancel so that no more events are transmitted. This is only used for a cancel request. int64
create watch
cancel watch
To install Net::Etcd, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Etcd
CPAN shell
perl -MCPAN -e shell install Net::Etcd
For more information on module installation, please visit the detailed CPAN module installation guide.