worker.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /* Gearman server and library
  2. * Copyright (C) 2008 Brian Aker, Eric Day
  3. * All rights reserved.
  4. *
  5. * Use and distribution licensed under the BSD license. See
  6. * the COPYING file in the parent directory for full text.
  7. */
  8. /**
  9. * @file
  10. * @brief Worker Declarations
  11. */
  12. #pragma once
  13. #include <libgearman-server/struct/worker.h>
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. /** @addtogroup gearman_server_worker Worker Declarations @ingroup
  18. * gearman_server
  19. *
  20. * This is a low level interface for gearman server workers. This is used
  21. * internally by the server interface, so you probably want to look there first.
  22. *
  23. * @{
  24. */
  25. /**
  26. * Add a new worker to a server instance.
  27. */
  28. GEARMAN_API
  29. gearman_server_worker_st *
  30. gearman_server_worker_add(gearman_server_con_st *con, const char *function_name,
  31. size_t function_name_size, uint32_t timeout);
  32. /**
  33. * Free a server worker structure.
  34. */
  35. GEARMAN_API
  36. void gearman_server_worker_free(gearman_server_worker_st *worker);
  37. /** @} */
  38. #ifdef __cplusplus
  39. }
  40. #endif