nats.zig/deps/nats.c/doc/html/group__kv_watcher.html
torque 79a45fd2e3
git subrepo clone (merge) --branch=v3.6.1 https://github.com/nats-io/nats.c.git deps/nats.c
subrepo:
  subdir:   "deps/nats.c"
  merged:   "66cec7f"
upstream:
  origin:   "https://github.com/nats-io/nats.c.git"
  branch:   "v3.6.1"
  commit:   "66cec7f"
git-subrepo:
  version:  "0.4.6"
  commit:   "b8b46501e"
2023-08-15 00:21:33 -07:00

225 lines
13 KiB
HTML

<!-- HTML header for doxygen 1.8.10-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<title>NATS C Client with JetStream and Streaming support: KeyValue store watcher</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;" >
<div id="projectname">NATS C Client with JetStream and Streaming support
&#160;<span id="projectnumber">3.6.1</span>
</div>
<div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.6 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('group__kv_watcher.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle"><div class="title">KeyValue store watcher<div class="ingroups"><a class="el" href="group__func_group.html">Functions</a> &raquo; <a class="el" href="group__kv_group.html">KeyValue store</a></div></div></div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga562c216a0199c30455af4c2da46000e5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_watcher.html#ga562c216a0199c30455af4c2da46000e5">kvWatcher_Next</a> (<a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> **new_entry, <a class="el" href="group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043">kvWatcher</a> *w, int64_t timeout)</td></tr>
<tr class="memdesc:ga562c216a0199c30455af4c2da46000e5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the next entry for this watcher. <br /></td></tr>
<tr class="separator:ga562c216a0199c30455af4c2da46000e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga73adf44114fedd62ef75ebd81839b65e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_watcher.html#ga73adf44114fedd62ef75ebd81839b65e">kvWatcher_Stop</a> (<a class="el" href="group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043">kvWatcher</a> *w)</td></tr>
<tr class="memdesc:ga73adf44114fedd62ef75ebd81839b65e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stops the watcher. <br /></td></tr>
<tr class="separator:ga73adf44114fedd62ef75ebd81839b65e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga21bc39fa795f7c4f392bd6d4e66ea1d9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_watcher.html#ga21bc39fa795f7c4f392bd6d4e66ea1d9">kvWatcher_Destroy</a> (<a class="el" href="group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043">kvWatcher</a> *w)</td></tr>
<tr class="memdesc:ga21bc39fa795f7c4f392bd6d4e66ea1d9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the KeyValue watcher object. <br /></td></tr>
<tr class="separator:ga21bc39fa795f7c4f392bd6d4e66ea1d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>These functions allow to receive updates for key(s) on a given bucket.</p>
<dl class="section warning"><dt>Warning</dt><dd>EXPERIMENTAL FEATURE! We reserve the right to change the API without necessarily bumping the major version of the library. </dd></dl>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga562c216a0199c30455af4c2da46000e5" name="ga562c216a0199c30455af4c2da46000e5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga562c216a0199c30455af4c2da46000e5">&#9670;&#160;</a></span>kvWatcher_Next()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> kvWatcher_Next </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> **&#160;</td>
<td class="paramname"><em>new_entry</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043">kvWatcher</a> *&#160;</td>
<td class="paramname"><em>w</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int64_t&#160;</td>
<td class="paramname"><em>timeout</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the next entry for this watcher. The entry may be <code>NULL</code> (with <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990" title="Success.">NATS_OK</a> status) to indicate that the initial state has been retrieved.</p>
<p>If a thread is waiting on this call, it can be canceled with a call to <a class="el" href="group__kv_watcher.html#ga73adf44114fedd62ef75ebd81839b65e" title="Stops the watcher.">kvWatcher_Stop</a>.</p>
<dl class="section note"><dt>Note</dt><dd>The entry should be destroyed to release memory using <a class="el" href="group__kv_entry.html#ga8359ffcdeefb9c5821e6442d0d5ee388" title="Destroys the KeyValue entry object.">kvEntry_Destroy</a>.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">new_entry</td><td>the location where to store the pointer to the <a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> object. </td></tr>
<tr><td class="paramname">w</td><td>the pointer to the <a class="el" href="group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043">kvWatcher</a> object. </td></tr>
<tr><td class="paramname">timeout</td><td>how long to wait (in milliseconds) for the next entry. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="ga73adf44114fedd62ef75ebd81839b65e" name="ga73adf44114fedd62ef75ebd81839b65e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga73adf44114fedd62ef75ebd81839b65e">&#9670;&#160;</a></span>kvWatcher_Stop()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> kvWatcher_Stop </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043">kvWatcher</a> *&#160;</td>
<td class="paramname"><em>w</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Stops the watcher. Stopping a stopped watcher returns <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990" title="Success.">NATS_OK</a>.</p>
<p>After this call, new and existing calls to <a class="el" href="group__kv_watcher.html#ga562c216a0199c30455af4c2da46000e5" title="Returns the next entry for this watcher.">kvWatcher_Next</a> (that are waiting for an update) will return with <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9bb78b4f245d2870040d25c450febd4b">NATS_ILLEGAL_STATE</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">w</td><td>the pointer to the <a class="el" href="group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043">kvWatcher</a> object. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="ga21bc39fa795f7c4f392bd6d4e66ea1d9" name="ga21bc39fa795f7c4f392bd6d4e66ea1d9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga21bc39fa795f7c4f392bd6d4e66ea1d9">&#9670;&#160;</a></span>kvWatcher_Destroy()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void kvWatcher_Destroy </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043">kvWatcher</a> *&#160;</td>
<td class="paramname"><em>w</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Releases memory allocated for this <a class="el" href="group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043">kvWatcher</a> object.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">w</td><td>the pointer to the <a class="el" href="group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043">kvWatcher</a> object. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.10-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="footer">NATS.IO Supported By Synadia Communications Inc.
<a href="http://www.nats.io">
</a></li>
</ul>
</div>
</body>
</html>