[SR-Dev] git:master: htable: document event_route[htable:mod-init]

Daniel-Constantin Mierla miconda at gmail.com
Wed May 20 20:09:49 CEST 2009


Module: sip-router
Branch: master
Commit: 6f22852feb1afa87a520b97f456e14cb3c254736
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=6f22852feb1afa87a520b97f456e14cb3c254736

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Wed May 20 21:08:56 2009 +0300

htable: document event_route[htable:mod-init]

---

 modules_k/htable/README               |   23 +++++++++++++++++++++++
 modules_k/htable/doc/htable_admin.xml |   21 +++++++++++++++++++++
 2 files changed, 44 insertions(+), 0 deletions(-)

diff --git a/modules_k/htable/README b/modules_k/htable/README
index eac4bc6..03a5956 100644
--- a/modules_k/htable/README
+++ b/modules_k/htable/README
@@ -50,6 +50,10 @@ Elena-Ramona Modroiu
               6.1. sht_reload
               6.2. sht_dump
 
+        7. Event routes
+
+              7.1. htable:mod-init
+
    List of Examples
 
    1.1. Accessing $sht(htname=>key)
@@ -104,6 +108,10 @@ Chapter 1. Admin Guide
         6.1. sht_reload
         6.2. sht_dump
 
+   7. Event routes
+
+        7.1. htable:mod-init
+
 1. Overview
 
    The module adds a hash table container to configuration language. The
@@ -434,3 +442,18 @@ sht_rm_value_re("ha=>.*");
                 :sht_dump:_reply_fifo_file_
                 _hash_table_name_
                 _empty_line_
+
+7. Event routes
+
+   7.1. htable:mod-init
+
+7.1.  htable:mod-init
+
+   When defined, the module calls event_route[htable:mod-init] after all
+   modules have been initialised. A typical use case is to initialise
+   items in hash tables. The event route is executed only once.
+...
+event_route[htable:mod-init] {
+    $sht(a=>x) = 1;
+}
+...
diff --git a/modules_k/htable/doc/htable_admin.xml b/modules_k/htable/doc/htable_admin.xml
index 783db8e..fbb0a3a 100644
--- a/modules_k/htable/doc/htable_admin.xml
+++ b/modules_k/htable/doc/htable_admin.xml
@@ -553,6 +553,27 @@ sht_rm_value_re("ha=>.*");
 		</programlisting>
     </section>
     </section>
+	<section>
+	<title>Event routes</title>
+	<section>
+		<title>
+		<function moreinfo="none">htable:mod-init</function>
+		</title>
+		<para>
+			When defined, the module calls event_route[htable:mod-init] after
+			all modules have been initialised. A typical use case is to
+			initialise items in hash tables. The event route is executed only
+			once.
+		</para>
+        <programlisting  format="linespecific">
+...			
+event_route[htable:mod-init] {
+    $sht(a=>x) = 1;
+}
+...
+		</programlisting>
+    </section>
+    </section>
 
 </chapter>
 




More information about the sr-dev mailing list