Gearman Public API Documentation

Gearman Constants

Defines

#define GEARMAN_DEFAULT_TCP_HOST   "127.0.0.1"
#define GEARMAN_DEFAULT_TCP_PORT   4730
#define GEARMAN_DEFAULT_SOCKET_TIMEOUT   10
#define GEARMAN_DEFAULT_SOCKET_SEND_SIZE   32768
#define GEARMAN_DEFAULT_SOCKET_RECV_SIZE   32768
#define GEARMAN_MAX_ERROR_SIZE   1024
#define GEARMAN_PACKET_HEADER_SIZE   12
#define GEARMAN_JOB_HANDLE_SIZE   64
#define GEARMAN_OPTION_SIZE   64
#define GEARMAN_UNIQUE_SIZE   64
#define GEARMAN_MAX_COMMAND_ARGS   8
#define GEARMAN_ARGS_BUFFER_SIZE   128
#define GEARMAN_SEND_BUFFER_SIZE   8192
#define GEARMAN_RECV_BUFFER_SIZE   8192
#define GEARMAN_WORKER_WAIT_TIMEOUT   (10 * 1000)

Typedefs

typedef struct gearman_st gearman_st
typedef struct gearman_con_st gearman_con_st
typedef struct gearman_packet_st gearman_packet_st
typedef struct
gearman_command_info_st 
gearman_command_info_st
typedef struct gearman_task_st gearman_task_st
typedef struct gearman_client_st gearman_client_st
typedef struct gearman_job_st gearman_job_st
typedef struct gearman_worker_st gearman_worker_st
typedef struct
gearman_worker_function_st 
gearman_worker_function_st
typedef gearman_return_tgearman_workload_fn )(gearman_task_st *task)
typedef gearman_return_tgearman_created_fn )(gearman_task_st *task)
typedef gearman_return_tgearman_data_fn )(gearman_task_st *task)
typedef gearman_return_tgearman_warning_fn )(gearman_task_st *task)
typedef gearman_return_tgearman_status_fn )(gearman_task_st *task)
typedef gearman_return_tgearman_complete_fn )(gearman_task_st *task)
typedef gearman_return_tgearman_exception_fn )(gearman_task_st *task)
typedef gearman_return_tgearman_fail_fn )(gearman_task_st *task)
typedef gearman_return_tgearman_parse_server_fn )(const char *host, in_port_t port, void *context)
typedef void *( gearman_worker_fn )(gearman_job_st *job, void *context, size_t *result_size, gearman_return_t *ret_ptr)
typedef gearman_return_tgearman_event_watch_fn )(gearman_con_st *con, short events, void *context)
typedef void *( gearman_malloc_fn )(size_t size, void *context)
typedef void( gearman_free_fn )(void *ptr, void *context)
typedef void( gearman_task_context_free_fn )(gearman_task_st *task, void *context)
typedef void( gearman_log_fn )(const char *line, gearman_verbose_t verbose, void *context)
typedef void( gearman_con_protocol_context_free_fn )(gearman_con_st *con, void *context)
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)
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)

Enumerations

enum  gearman_return_t {
  GEARMAN_SUCCESS, GEARMAN_IO_WAIT, GEARMAN_SHUTDOWN, GEARMAN_SHUTDOWN_GRACEFUL,
  GEARMAN_ERRNO, GEARMAN_EVENT, GEARMAN_TOO_MANY_ARGS, GEARMAN_NO_ACTIVE_FDS,
  GEARMAN_INVALID_MAGIC, GEARMAN_INVALID_COMMAND, GEARMAN_INVALID_PACKET, GEARMAN_UNEXPECTED_PACKET,
  GEARMAN_GETADDRINFO, GEARMAN_NO_SERVERS, GEARMAN_LOST_CONNECTION, GEARMAN_MEMORY_ALLOCATION_FAILURE,
  GEARMAN_JOB_EXISTS, GEARMAN_JOB_QUEUE_FULL, GEARMAN_SERVER_ERROR, GEARMAN_WORK_ERROR,
  GEARMAN_WORK_DATA, GEARMAN_WORK_WARNING, GEARMAN_WORK_STATUS, GEARMAN_WORK_EXCEPTION,
  GEARMAN_WORK_FAIL, GEARMAN_NOT_CONNECTED, GEARMAN_COULD_NOT_CONNECT, GEARMAN_SEND_IN_PROGRESS,
  GEARMAN_RECV_IN_PROGRESS, GEARMAN_NOT_FLUSHING, GEARMAN_DATA_TOO_LARGE, GEARMAN_INVALID_FUNCTION_NAME,
  GEARMAN_INVALID_WORKER_FUNCTION, GEARMAN_NO_REGISTERED_FUNCTIONS, GEARMAN_NO_JOBS, GEARMAN_ECHO_DATA_CORRUPTION,
  GEARMAN_NEED_WORKLOAD_FN, GEARMAN_PAUSE, GEARMAN_UNKNOWN_STATE, GEARMAN_PTHREAD,
  GEARMAN_PIPE_EOF, GEARMAN_QUEUE_ERROR, GEARMAN_FLUSH_DATA, GEARMAN_SEND_BUFFER_TOO_SMALL,
  GEARMAN_IGNORE_PACKET, GEARMAN_UNKNOWN_OPTION, GEARMAN_TIMEOUT, GEARMAN_MAX_RETURN
}
enum  gearman_verbose_t {
  GEARMAN_VERBOSE_FATAL, GEARMAN_VERBOSE_ERROR, GEARMAN_VERBOSE_INFO, GEARMAN_VERBOSE_DEBUG,
  GEARMAN_VERBOSE_CRAZY, GEARMAN_VERBOSE_MAX
}

Variables

gearman_command_info_st gearman_command_info_list [GEARMAN_COMMAND_MAX]

Define Documentation

#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.


Typedef Documentation

typedef struct gearman_st gearman_st

Definition at line 44 of file constants.h.

Definition at line 45 of file constants.h.

Definition at line 46 of file constants.h.

Definition at line 47 of file constants.h.

Definition at line 48 of file constants.h.

Definition at line 49 of file constants.h.

Definition at line 50 of file constants.h.

Definition at line 51 of file constants.h.

Definition at line 52 of file constants.h.

Definition at line 394 of file constants.h.

Definition at line 395 of file constants.h.

Definition at line 396 of file constants.h.

Definition at line 397 of file constants.h.

Definition at line 398 of file constants.h.

Definition at line 399 of file constants.h.

Definition at line 400 of file constants.h.

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.


Enumeration Type Documentation

Return codes.

Enumerator:
GEARMAN_SUCCESS 
GEARMAN_IO_WAIT 
GEARMAN_SHUTDOWN 
GEARMAN_SHUTDOWN_GRACEFUL 
GEARMAN_ERRNO 
GEARMAN_EVENT 
GEARMAN_TOO_MANY_ARGS 
GEARMAN_NO_ACTIVE_FDS 
GEARMAN_INVALID_MAGIC 
GEARMAN_INVALID_COMMAND 
GEARMAN_INVALID_PACKET 
GEARMAN_UNEXPECTED_PACKET 
GEARMAN_GETADDRINFO 
GEARMAN_NO_SERVERS 
GEARMAN_LOST_CONNECTION 
GEARMAN_MEMORY_ALLOCATION_FAILURE 
GEARMAN_JOB_EXISTS 
GEARMAN_JOB_QUEUE_FULL 
GEARMAN_SERVER_ERROR 
GEARMAN_WORK_ERROR 
GEARMAN_WORK_DATA 
GEARMAN_WORK_WARNING 
GEARMAN_WORK_STATUS 
GEARMAN_WORK_EXCEPTION 
GEARMAN_WORK_FAIL 
GEARMAN_NOT_CONNECTED 
GEARMAN_COULD_NOT_CONNECT 
GEARMAN_SEND_IN_PROGRESS 
GEARMAN_RECV_IN_PROGRESS 
GEARMAN_NOT_FLUSHING 
GEARMAN_DATA_TOO_LARGE 
GEARMAN_INVALID_FUNCTION_NAME 
GEARMAN_INVALID_WORKER_FUNCTION 
GEARMAN_NO_REGISTERED_FUNCTIONS 
GEARMAN_NO_JOBS 
GEARMAN_ECHO_DATA_CORRUPTION 
GEARMAN_NEED_WORKLOAD_FN 
GEARMAN_PAUSE 
GEARMAN_UNKNOWN_STATE 
GEARMAN_PTHREAD 
GEARMAN_PIPE_EOF 
GEARMAN_QUEUE_ERROR 
GEARMAN_FLUSH_DATA 
GEARMAN_SEND_BUFFER_TOO_SMALL 
GEARMAN_IGNORE_PACKET 
GEARMAN_UNKNOWN_OPTION 
GEARMAN_TIMEOUT 
GEARMAN_MAX_RETURN 

Definition at line 57 of file constants.h.

Verbosity levels.

Enumerator:
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.


Variable Documentation

Command information array.


Generated on Tue Oct 13 20:19:20 2009 by  doxygen 1.6.1