Gearman Developer Documentation

Gearman Declarations

Defines

#define gearman_timeout(__object)   ((__object)->gearman.timeout)
#define gearman_set_timeout(__object, __value)   ((__object)->gearman.timeout)=(__value);

Functions

const char * gearman_version (void)
const char * gearman_bugreport (void)
const char * gearman_verbose_name (gearman_verbose_t verbose)
gearman_return_t gearman_parse_servers (const char *servers, gearman_parse_server_fn *callback, void *context)

Detailed Description

This is a low level interface for gearman library instances. This is used internally by both client and worker interfaces, so you probably want to look there first. This is usually used to write lower level clients, workers, proxies, or your own server.

There is no locking within a single gearman_universal_st structure, so for threaded applications you must either ensure isolation in the application or use multiple gearman_universal_st structures (for example, one for each thread).


Define Documentation

#define gearman_timeout ( __object   )     ((__object)->gearman.timeout)

Get current socket I/O activity timeout value.

Parameters:
[in] gearman_client_st or gearman_worker_st Structure previously initialized.
Returns:
Timeout in milliseconds to wait for I/O activity. A negative value means an infinite timeout.
Note:
This is a utility macro.

Definition at line 109 of file gearman.h.

#define gearman_set_timeout ( __object,
__value   )     ((__object)->gearman.timeout)=(__value);

Set socket I/O activity timeout for connections in a Gearman structure.

Parameters:
[in] gearman_client_st or gearman_worker_st Structure previously initialized.
[in] timeout Milliseconds to wait for I/O activity. A negative value means an infinite timeout.
Note:
This is a utility macro.

Definition at line 119 of file gearman.h.


Function Documentation

const char* gearman_version ( void   ) 

Get Gearman library version.

Returns:
Version string of library.

Definition at line 41 of file gearman.c.

const char* gearman_bugreport ( void   ) 

Get bug report URL.

Returns:
Bug report URL string.

Definition at line 46 of file gearman.c.

const char* gearman_verbose_name ( gearman_verbose_t  verbose  ) 

Get string with the name of the given verbose level.

Parameters:
[in] verbose Verbose logging level.
Returns:
String form of verbose level.

Definition at line 51 of file gearman.c.

gearman_return_t gearman_parse_servers ( const char *  servers,
gearman_parse_server_fn callback,
void *  context 
)

Utility function used for parsing server lists.

Parameters:
[in] servers String containing a list of servers to parse.
[in] callback Function to call for each server that is found.
[in] context Argument to pass along with callback function.
Returns:
Standard Gearman return value.

Definition at line 59 of file gearman.c.

Generated on Tue Jun 15 11:40:21 2010 by  doxygen 1.6.3