See Main Page for full details.
Options for gearman_client_st.
| GEARMAN_CLIENT_ALLOCATED | |
| GEARMAN_CLIENT_NON_BLOCKING | |
| GEARMAN_CLIENT_TASK_IN_USE | |
| GEARMAN_CLIENT_UNBUFFERED_RESULT | |
| GEARMAN_CLIENT_NO_NEW | |
| GEARMAN_CLIENT_FREE_TASKS |
Definition at line 312 of file constants.h.
States for gearman_client_st.
| GEARMAN_CLIENT_STATE_IDLE | |
| GEARMAN_CLIENT_STATE_NEW | |
| GEARMAN_CLIENT_STATE_SUBMIT | |
| GEARMAN_CLIENT_STATE_PACKET |
Definition at line 326 of file constants.h.
| gearman_client_st* gearman_client_create | ( | gearman_client_st * | client | ) |
Initialize a client structure. Always check the return value even if passing in a pre-allocated structure. Some other initialization may have failed.
| [in] | client | Caller allocated structure, or NULL to allocate one. |
| gearman_client_st* gearman_client_clone | ( | gearman_client_st * | client, | |
| const gearman_client_st * | from | |||
| ) |
Clone a client structure.
| [in] | client | Caller allocated structure, or NULL to allocate one. |
| [in] | from | Structure to use as a source to clone from. |
| void gearman_client_free | ( | gearman_client_st * | client | ) |
Free resources used by a client structure.
| [in] | client | Structure previously initialized with gearman_client_create() or gearman_client_clone(). |
| const char* gearman_client_error | ( | const gearman_client_st * | client | ) |
See gearman_error() for details.
| int gearman_client_errno | ( | const gearman_client_st * | client | ) |
See gearman_errno() for details.
| gearman_client_options_t gearman_client_options | ( | const gearman_client_st * | client | ) |
Get options for a client structure.
| [in] | client | Structure previously initialized with gearman_client_create() or gearman_client_clone(). |
| void gearman_client_set_options | ( | gearman_client_st * | client, | |
| gearman_client_options_t | options | |||
| ) |
Set options for a client structure.
| [in] | client | Structure previously initialized with gearman_client_create() or gearman_client_clone(). |
| [in] | options | Available options for client structures. |
| void gearman_client_add_options | ( | gearman_client_st * | client, | |
| gearman_client_options_t | options | |||
| ) |
Add options for a client structure.
| [in] | client | Structure previously initialized with gearman_client_create() or gearman_client_clone(). |
| [in] | options | Available options for client structures. |
| void gearman_client_remove_options | ( | gearman_client_st * | client, | |
| gearman_client_options_t | options | |||
| ) |
Remove options for a client structure.
| [in] | client | Structure previously initialized with gearman_client_create() or gearman_client_clone(). |
| [in] | options | Available options for client structures. |
| int gearman_client_timeout | ( | gearman_client_st * | client | ) |
See gearman_timeout() for details.
| void gearman_client_set_timeout | ( | gearman_client_st * | client, | |
| int | timeout | |||
| ) |
See gearman_set_timeout() for details.
| void* gearman_client_context | ( | const gearman_client_st * | client | ) |
Get the application context for a client.
| [in] | client | Structure previously initialized with gearman_client_create() or gearman_client_clone(). |
| void gearman_client_set_context | ( | gearman_client_st * | client, | |
| const void * | context | |||
| ) |
Set the application context for a client.
| [in] | client | Structure previously initialized with gearman_client_create() or gearman_client_clone(). |
| [in] | context | Application context to set. |
| void gearman_client_set_log_fn | ( | gearman_client_st * | client, | |
| gearman_log_fn * | function, | |||
| const void * | context, | |||
| gearman_verbose_t | verbose | |||
| ) |
See gearman_set_log_fn() for details.
| void gearman_client_set_event_watch_fn | ( | gearman_client_st * | client, | |
| gearman_event_watch_fn * | function, | |||
| const void * | context | |||
| ) |
See gearman_set_event_watch_fn() for details.
| void gearman_client_set_workload_malloc_fn | ( | gearman_client_st * | client, | |
| gearman_malloc_fn * | function, | |||
| const void * | context | |||
| ) |
See gearman_set_workload_malloc_fn() for details.
| void gearman_client_set_workload_free_fn | ( | gearman_client_st * | client, | |
| gearman_free_fn * | function, | |||
| const void * | context | |||
| ) |
See gearman_set_workload_malloc_fn() for details.
| gearman_return_t gearman_client_add_server | ( | gearman_client_st * | client, | |
| const char * | host, | |||
| in_port_t | port | |||
| ) |
Add a job server to a client. This goes into a list of servers that can be used to run tasks. No socket I/O happens here, it is just added to a list.
| [in] | client | Structure previously initialized with gearman_client_create() or gearman_client_clone(). |
| [in] | host | Hostname or IP address (IPv4 or IPv6) of the server to add. |
| [in] | port | Port of the server to add. |
| gearman_return_t gearman_client_add_servers | ( | gearman_client_st * | client, | |
| const char * | servers | |||
| ) |
Add a list of job servers to a client. The format for the server list is: SERVER[:PORT][,SERVER[:PORT]]... Some examples are: 10.0.0.1,10.0.0.2,10.0.0.3 localhost:1234,jobserver2.domain.com:7003,10.0.0.3
| [in] | client | Structure previously initialized with gearman_client_create() or gearman_client_clone(). |
| [in] | servers | Server list described above. |
| void gearman_client_remove_servers | ( | gearman_client_st * | client | ) |
Remove all servers currently associated with the client.
| [in] | client | Structure previously initialized with gearman_client_create() or gearman_client_clone(). |
| gearman_return_t gearman_client_wait | ( | gearman_client_st * | client | ) |
When in non-blocking I/O mode, wait for activity from one of the servers.
| [in] | client | Structure previously initialized with gearman_client_create() or gearman_client_clone(). |
1.5.6