Browse Source

Merge in namespace docs.

Brian Aker 14 years ago
parent
commit
88e89ea33d
5 changed files with 54 additions and 3 deletions
  1. 2 0
      Makefile.am
  2. 2 0
      docs/conf.py
  3. 2 0
      docs/include.am
  4. 4 3
      docs/index.rst
  5. 44 0
      docs/namespace.rst

+ 2 - 0
Makefile.am

@@ -35,6 +35,8 @@ include tests/include.am
 include support/include.am
 include docs/include.am
 
+docs: html man
+
 TESTS += ${check_PROGRAMS}
 
 EXTRA_DIST+= ${man_MANS}

+ 2 - 0
docs/conf.py

@@ -212,6 +212,8 @@ latex_documents = [
 
 # (source start file, name, description, authors, manual section).
 man_pages = [
+  ('namespace', 'gearman_client_set_namespace', u'Gearmand Documentation', [u'Data Differential http://datadifferential.com/'], 3),
+  ('namespace', 'gearman_worker_set_namespace', u'Gearmand Documentation', [u'Data Differential http://datadifferential.com/'], 3),
   ('gearman_bugreport', 'gearman_bugreport', u'Gearmand Documentation', [u'Data Differential http://datadifferential.com/'], 3),
   ('gearman_client', 'gearman_client_clone', u'Gearmand Documentation', [u'Data Differential http://datadifferential.com/'], 3),
   ('gearman_client', 'gearman_client_create', u'Gearmand Documentation', [u'Data Differential http://datadifferential.com/'], 3),

+ 2 - 0
docs/include.am

@@ -63,6 +63,7 @@ man_MANS+= \
 	   docs/man/gearman_client_set_exception_fn.3 \
 	   docs/man/gearman_client_set_fail_fn.3 \
 	   docs/man/gearman_client_set_log_fn.3 \
+	   docs/man/gearman_client_set_namespace.3 \
 	   docs/man/gearman_client_set_options.3 \
 	   docs/man/gearman_client_set_status_fn.3 \
 	   docs/man/gearman_client_set_task_context_free_fn.3 \
@@ -132,6 +133,7 @@ man_MANS+= \
 	   docs/man/gearman_worker_remove_servers.3 \
 	   docs/man/gearman_worker_set_context.3 \
 	   docs/man/gearman_worker_set_log_fn.3 \
+	   docs/man/gearman_worker_set_namespace.3 \
 	   docs/man/gearman_worker_set_options.3 \
 	   docs/man/gearman_worker_set_timeout.3 \
 	   docs/man/gearman_worker_set_workload_free_fn.3 \

+ 4 - 3
docs/index.rst

@@ -71,14 +71,15 @@ Worker Calls
    gearman_worker
    gearman_worker_add_map_function
 
-********************
-Other Function Calls
-********************
+****
+Misc
+****
 
 .. toctree::
    :maxdepth: 2
 
    gearman_misc_functions
+   namespace
 
 **********
 Structures

+ 44 - 0
docs/namespace.rst

@@ -0,0 +1,44 @@
+================ 
+Using namespaces 
+================
+
+--------
+SYNOPSIS
+--------
+
+#include <libgearman/gearman.h>
+
+.. c:function:: void gearman_client_set_namespace(gearman_client_st *self, const char *namespace_key, size_t namespace_key_size)
+
+.. c:function:: void gearman_worker_set_namespace(gearman_worker_st *self, const char *namespace_key, size_t namespace_key_size) 
+
+Compile and link with -lgearman
+
+-----------
+DESCRIPTION
+-----------
+
+gearman_client_set_namespace() and gearman_worker_set_namespace() set a "namespace" for a given set of functions. Only clients and workers sharing a :c:data:`namespace_key` can
+see one anothers workloads and functions.
+
+By setting :c:data:`namespace_key` to NULL you can disable the namespace.
+
+------
+RETURN
+------
+
+None
+
+----
+HOME
+----
+
+To find out more information please check:
+`https://launchpad.net/gearmand <https://launchpad.net/gearmand>`_
+
+
+--------
+SEE ALSO
+--------
+
+:manpage:`gearmand(8)` :manpage:`libgearman(3)`