Sam Batschelet
and 1 contributors

NAME

Net::Etcd::Range

DESCRIPTION

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.

ACCESSORS

endpoint

key

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

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

start_revision is an optional revision to watch from (inclusive). No start_revision is "now". int64

progress_notify

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.

filters

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.

prev_key

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

watch_id is the watcher id to cancel so that no more events are transmitted. This is only used for a cancel request. int64

PUBLIC METHODS

create

create watch

cancel

cancel watch