Gearman Developer Documentation

HTTP Protocol Functions

Data Structures

struct  gearman_protocol_http_st

Defines

#define GEARMAN_PROTOCOL_HTTP_DEFAULT_PORT   8080

Functions

static gearman_return_t _http_con_add (gearman_con_st *con)
static void _http_free (gearman_con_st *con, void *data)
static size_t _http_pack (const gearman_packet_st *packet, gearman_con_st *con, void *data, size_t data_size, gearman_return_t *ret_ptr)
static size_t _http_unpack (gearman_packet_st *packet, gearman_con_st *con, const void *data, size_t data_size, gearman_return_t *ret_ptr)
static const char * _http_line (const void *data, size_t data_size, size_t *line_size, size_t *offset)
gearman_return_t gearmand_protocol_http_conf (gearman_conf_st *conf)
gearman_return_t gearmand_protocol_http_init (gearmand_st *gearmand, gearman_conf_st *conf)
gearman_return_t gearmand_protocol_http_deinit (gearmand_st *gearmand)

Detailed Description

This module provides a simple HTTP interface into the Gearman job server. It is also meant to serve as an example of how other protocols can plug into the server. This module will ignore all headers except: Content-Length: SIZE Connection: Keep-Alive X-Gearman-Unique: UNIQUE_KEY X-Gearman-Background: true X-Gearman-Priority: HIGH | LOW All HTTP requests are translated into SUBMIT_JOB requests, and only WORK_COMPLETE, WORK_FAIL, and JOB_CREATED responses are returned. JOB_CREATED packet are only sent back if the "X-Gearman-Background: true" header is given.


Define Documentation

#define GEARMAN_PROTOCOL_HTTP_DEFAULT_PORT   8080

Default values.

Definition at line 28 of file protocol_http.c.


Function Documentation

static gearman_return_t _http_con_add ( gearman_con_st con  )  [static]

Definition at line 121 of file protocol_http.c.

static void _http_free ( gearman_con_st con,
void *  data 
) [static]
static size_t _http_pack ( const gearman_packet_st packet,
gearman_con_st con,
void *  data,
size_t  data_size,
gearman_return_t ret_ptr 
) [static]

Definition at line 148 of file protocol_http.c.

static size_t _http_unpack ( gearman_packet_st packet,
gearman_con_st con,
const void *  data,
size_t  data_size,
gearman_return_t ret_ptr 
) [static]

Definition at line 191 of file protocol_http.c.

static const char * _http_line ( const void *  data,
size_t  data_size,
size_t *  line_size,
size_t *  offset 
) [static]

Definition at line 377 of file protocol_http.c.

gearman_return_t gearmand_protocol_http_conf ( gearman_conf_st conf  ) 

Get module configuration options.

Definition at line 63 of file protocol_http.c.

gearman_return_t gearmand_protocol_http_init ( gearmand_st gearmand,
gearman_conf_st conf 
)

Initialize the HTTP protocol module.

Definition at line 77 of file protocol_http.c.

gearman_return_t gearmand_protocol_http_deinit ( gearmand_st gearmand  ) 

De-initialize the HTTP protocol module.


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