| #define GEARMAN_DEFAULT_TCP_HOST "127.0.0.1" |
Definition at line 27 of file constants.h.
| #define GEARMAN_DEFAULT_TCP_PORT 4730 |
Definition at line 28 of file constants.h.
| #define GEARMAN_DEFAULT_SOCKET_TIMEOUT 10 |
Definition at line 29 of file constants.h.
| #define GEARMAN_DEFAULT_SOCKET_SEND_SIZE 32768 |
Definition at line 30 of file constants.h.
| #define GEARMAN_DEFAULT_SOCKET_RECV_SIZE 32768 |
Definition at line 31 of file constants.h.
| #define GEARMAN_MAX_ERROR_SIZE 1024 |
Definition at line 32 of file constants.h.
| #define GEARMAN_PACKET_HEADER_SIZE 12 |
Definition at line 33 of file constants.h.
| #define GEARMAN_JOB_HANDLE_SIZE 64 |
Definition at line 34 of file constants.h.
| #define GEARMAN_OPTION_SIZE 64 |
Definition at line 35 of file constants.h.
| #define GEARMAN_UNIQUE_SIZE 64 |
Definition at line 36 of file constants.h.
| #define GEARMAN_MAX_COMMAND_ARGS 8 |
Definition at line 37 of file constants.h.
| #define GEARMAN_ARGS_BUFFER_SIZE 128 |
Definition at line 38 of file constants.h.
| #define GEARMAN_SEND_BUFFER_SIZE 8192 |
Definition at line 39 of file constants.h.
| #define GEARMAN_RECV_BUFFER_SIZE 8192 |
Definition at line 40 of file constants.h.
| #define GEARMAN_WORKER_WAIT_TIMEOUT (10 * 1000) |
Definition at line 41 of file constants.h.
| #define GEARMAN_LOG | ( | __gearman, | |||
| __verbose, | |||||
| ... | ) |
Value:
{ \
if ((__gearman)->log_fn != NULL) \
{ \
char _log_buffer[GEARMAN_MAX_ERROR_SIZE]; \
snprintf(_log_buffer, GEARMAN_MAX_ERROR_SIZE, __VA_ARGS__); \
(*((__gearman)->log_fn))(_log_buffer, __verbose, \
(void *)(__gearman)->log_context); \
} \
}
| #define GEARMAN_FATAL | ( | __gearman, | |||
| ... | ) | GEARMAN_LOG(__gearman, GEARMAN_VERBOSE_FATAL, __VA_ARGS__) |
| #define GEARMAN_ERROR | ( | __gearman, | |||
| ... | ) |
Value:
{ \
unlikely ((__gearman)->verbose >= GEARMAN_VERBOSE_ERROR) \
GEARMAN_LOG(__gearman, GEARMAN_VERBOSE_ERROR, __VA_ARGS__) \
}
| #define GEARMAN_INFO | ( | __gearman, | |||
| ... | ) |
Value:
{ \
unlikely ((__gearman)->verbose >= GEARMAN_VERBOSE_INFO) \
GEARMAN_LOG(__gearman, GEARMAN_VERBOSE_INFO, __VA_ARGS__) \
}
| #define GEARMAN_DEBUG | ( | __gearman, | |||
| ... | ) |
Value:
{ \
unlikely ((__gearman)->verbose >= GEARMAN_VERBOSE_DEBUG) \
GEARMAN_LOG(__gearman, GEARMAN_VERBOSE_DEBUG, __VA_ARGS__) \
}
| #define GEARMAN_CRAZY | ( | __gearman, | |||
| ... | ) |
Value:
{ \
unlikely ((__gearman)->verbose >= GEARMAN_VERBOSE_CRAZY) \
GEARMAN_LOG(__gearman, GEARMAN_VERBOSE_CRAZY, __VA_ARGS__) \
}
| #define GEARMAN_ERROR_SET | ( | __gearman, | |||
| __function, | |||||
| ... | ) |
Value:
{ \
if ((__gearman)->log_fn == NULL) \
{ \
snprintf((__gearman)->last_error, GEARMAN_MAX_ERROR_SIZE, \
__function ":" __VA_ARGS__); \
} \
else \
GEARMAN_FATAL(__gearman, __function ":" __VA_ARGS__) \
}
| #define GEARMAN_LIST_ADD | ( | __list, | |||
| __obj, | |||||
| __prefix | ) |
| #define GEARMAN_LIST_DEL | ( | __list, | |||
| __obj, | |||||
| __prefix | ) |
Value:
{ \
if (__list ## _list == __obj) \
__list ## _list= __obj->__prefix ## next; \
if (__obj->__prefix ## prev != NULL) \
__obj->__prefix ## prev->__prefix ## next= __obj->__prefix ## next; \
if (__obj->__prefix ## next != NULL) \
__obj->__prefix ## next->__prefix ## prev= __obj->__prefix ## prev; \
__list ## _count--; \
}
| #define GEARMAN_FIFO_ADD | ( | __list, | |||
| __obj, | |||||
| __prefix | ) |
| #define GEARMAN_FIFO_DEL | ( | __list, | |||
| __obj, | |||||
| __prefix | ) |
| #define GEARMAN_HASH_ADD | ( | __hash, | |||
| __key, | |||||
| __obj, | |||||
| __prefix | ) |
Value:
{ \
if (__hash ## _hash[__key] != NULL) \
__hash ## _hash[__key]->__prefix ## prev= __obj; \
__obj->__prefix ## next= __hash ## _hash[__key]; \
__obj->__prefix ## prev= NULL; \
__hash ## _hash[__key]= __obj; \
__hash ## _count++; \
}
| #define GEARMAN_HASH_DEL | ( | __hash, | |||
| __key, | |||||
| __obj, | |||||
| __prefix | ) |
Value:
{ \
if (__hash ## _hash[__key] == __obj) \
__hash ## _hash[__key]= __obj->__prefix ## next; \
if (__obj->__prefix ## prev != NULL) \
__obj->__prefix ## prev->__prefix ## next= __obj->__prefix ## next; \
if (__obj->__prefix ## next != NULL) \
__obj->__prefix ## next->__prefix ## prev= __obj->__prefix ## prev; \
__hash ## _count--; \
}
| typedef struct gearman_st gearman_st |
Definition at line 44 of file constants.h.
| typedef struct gearman_con_st gearman_con_st |
Definition at line 45 of file constants.h.
| typedef struct gearman_packet_st gearman_packet_st |
Definition at line 46 of file constants.h.
| typedef struct gearman_command_info_st gearman_command_info_st |
Definition at line 47 of file constants.h.
| typedef struct gearman_task_st gearman_task_st |
Definition at line 48 of file constants.h.
| typedef struct gearman_client_st gearman_client_st |
Definition at line 49 of file constants.h.
| typedef struct gearman_job_st gearman_job_st |
Definition at line 50 of file constants.h.
| typedef struct gearman_worker_st gearman_worker_st |
Definition at line 51 of file constants.h.
| typedef struct gearman_worker_function_st gearman_worker_function_st |
Definition at line 52 of file constants.h.
| typedef gearman_return_t( gearman_workload_fn)(gearman_task_st *task) |
Definition at line 394 of file constants.h.
| typedef gearman_return_t( gearman_created_fn)(gearman_task_st *task) |
Definition at line 395 of file constants.h.
| typedef gearman_return_t( gearman_data_fn)(gearman_task_st *task) |
Definition at line 396 of file constants.h.
| typedef gearman_return_t( gearman_warning_fn)(gearman_task_st *task) |
Definition at line 397 of file constants.h.
| typedef gearman_return_t( gearman_status_fn)(gearman_task_st *task) |
Definition at line 398 of file constants.h.
| typedef gearman_return_t( gearman_complete_fn)(gearman_task_st *task) |
Definition at line 399 of file constants.h.
| typedef gearman_return_t( gearman_exception_fn)(gearman_task_st *task) |
Definition at line 400 of file constants.h.
| typedef gearman_return_t( gearman_fail_fn)(gearman_task_st *task) |
Definition at line 401 of file constants.h.
| typedef gearman_return_t( gearman_parse_server_fn)(const char *host, in_port_t port, void *context) |
Definition at line 403 of file constants.h.
| typedef void*( gearman_worker_fn)(gearman_job_st *job, void *context, size_t *result_size, gearman_return_t *ret_ptr) |
Definition at line 407 of file constants.h.
| typedef gearman_return_t( gearman_event_watch_fn)(gearman_con_st *con, short events, void *context) |
Definition at line 411 of file constants.h.
| typedef void*( gearman_malloc_fn)(size_t size, void *context) |
Definition at line 414 of file constants.h.
| typedef void( gearman_free_fn)(void *ptr, void *context) |
Definition at line 415 of file constants.h.
| typedef void( gearman_task_context_free_fn)(gearman_task_st *task, void *context) |
Definition at line 417 of file constants.h.
| typedef void( gearman_log_fn)(const char *line, gearman_verbose_t verbose, void *context) |
Definition at line 420 of file constants.h.
| typedef void( gearman_con_protocol_context_free_fn)(gearman_con_st *con, void *context) |
Definition at line 423 of file constants.h.
| typedef size_t( gearman_packet_pack_fn)(const gearman_packet_st *packet, gearman_con_st *con, void *data, size_t data_size, gearman_return_t *ret_ptr) |
Definition at line 426 of file constants.h.
| typedef size_t( gearman_packet_unpack_fn)(gearman_packet_st *packet, gearman_con_st *con, const void *data, size_t data_size, gearman_return_t *ret_ptr) |
Definition at line 430 of file constants.h.
| enum gearman_return_t |
Return codes.
Definition at line 57 of file constants.h.
| enum gearman_verbose_t |
Verbosity levels.
| GEARMAN_VERBOSE_FATAL | |
| GEARMAN_VERBOSE_ERROR | |
| GEARMAN_VERBOSE_INFO | |
| GEARMAN_VERBOSE_DEBUG | |
| GEARMAN_VERBOSE_CRAZY | |
| GEARMAN_VERBOSE_MAX |
Definition at line 112 of file constants.h.
| gearman_command_info_st gearman_command_info_list[GEARMAN_COMMAND_MAX] |
1.5.6