File: protocol_http.h

package info (click to toggle)
gearmand 0.13-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 3,876 kB
  • ctags: 1,656
  • sloc: ansic: 17,412; sh: 10,894; makefile: 76; cpp: 9
file content (68 lines) | stat: -rw-r--r-- 1,660 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/* Gearman server and library
 * Copyright (C) 2008 Brian Aker, Eric Day
 * All rights reserved.
 *
 * Use and distribution licensed under the BSD license.  See
 * the COPYING file in the parent directory for full text.
 */

/**
 * @file
 * @brief HTTP Protocol Declarations
 */

#ifndef __GEARMAN_PROTOCOL_HTTP_H__
#define __GEARMAN_PROTOCOL_HTTP_H__

#ifdef __cplusplus
extern "C" {
#endif

/**
 * @addtogroup gearman_protocol_http HTTP Protocol Declarations
 * @ingroup gearman_server_protocol
 *
 * 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.
 *
 * @{
 */

/**
 * Get module configuration options.
 */
GEARMAN_API
gearman_return_t gearmand_protocol_http_conf(gearman_conf_st *conf);

/**
 * Initialize the HTTP protocol module.
 */
GEARMAN_API
gearman_return_t gearmand_protocol_http_init(gearmand_st *gearmand,
                                             gearman_conf_st *conf);

/**
 * De-initialize the HTTP protocol module.
 */
GEARMAN_API
gearman_return_t gearmand_protocol_http_deinit(gearmand_st *gearmand);

/** @} */

#ifdef __cplusplus
}
#endif

#endif /* __GEARMAN_PROTOCOL_HTTP_H__ */