gearman_client_add_server.rst 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. ==============
  2. Adding Servers
  3. ==============
  4. --------
  5. SYNOPSIS
  6. --------
  7. #include <libgearman/gearman.h>
  8. .. c:function:: gearman_return_t gearman_client_add_server(gearman_client_st *client, const char *host, in_port_t port)
  9. .. c:function:: gearman_return_t gearman_client_add_servers(gearman_client_st *client, const char *servers)
  10. .. c:function:: void gearman_client_remove_servers(gearman_client_st *client)
  11. -----------
  12. DESCRIPTION
  13. -----------
  14. :c:func:`gearman_client_add_server` will add an additional :program:`gearmand` server to the list of servers that the client will take work from.
  15. :c:func:`gearman_client_remove_servers` will remove all servers from the :c:type:`gearman_client_st`.
  16. :c:func:`gearman_client_add_servers` takes a list of :program:`gearmand` servers that will be parsed to provide servers for the client. The format for this is SERVER[:PORT][,SERVER[:PORT]]...
  17. Examples of this are::
  18. 10.0.0.1,10.0.0.2,10.0.0.3
  19. localhost234,jobserver2.domain.com:7003,10.0.0.3
  20. ------------
  21. RETURN VALUE
  22. ------------
  23. :c:func:`gearman_client_add_server` and :c:func:`gearman_client_remove_servers` return :c:type:`gearman_return_t`.
  24. ----
  25. HOME
  26. ----
  27. To find out more information please check:
  28. `https://gearman.org/gearmand/ <https://gearman.org/gearmand/>`_
  29. .. seealso::
  30. :manpage:`gearmand(8)` :manpage:`libgearman(3)` :manpage:`gearman_client_st`