forked from garrettsickles/goapache
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodule.go
More file actions
66 lines (62 loc) · 1.73 KB
/
module.go
File metadata and controls
66 lines (62 loc) · 1.73 KB
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
package main
/*
#include <httpd.h>
#include <http_config.h>
#include <apr_pools.h>
////////////////////////////////////////////////////////////////
// Exported Symbols
//
// directives[...] (See 'directives.go' for implementation)
// Contains a NULL terminated array of directive
// entry-handler pairs for use by the apache module.
//
// These directives come from the modul's '*****.conf'
// file in the httpd configuration directory.
//
extern const command_rec directives[2];
//
// initialize(...) (See 'initialize.go' for implementation)
// The function to be run first at the start of the
// module. It will run first because it is configured
// to do so by the hooks(...) function below
//
extern void initialize(apr_pool_t*,server_rec*);
//
// handler(...) (See 'handler.go' for implementation)
// The entry point for the request. This processes
// the request_rec from apache.
//
// This is where all the http-ish thing should occur.
// For example setting the status code, the reply body,
// the content length, and so on...
//
extern int handler(request_rec*);
//
// hooks (See 'hooks.go' for implementation)
// Register hooks for the apache module.
// This is quit painful to do in Go compared to C-Go
// so I am leaving it right here for now.
//
// The functions listed above are the only boiler-plate
// needed to make this file compile.
//
extern void hooks(apr_pool_t *pool);
////////////////////////////////////////////////////////////////
// Implementation
//
// module 'mod_goapache_example'
//
//
module AP_MODULE_DECLARE_DATA mod_goapache_example =
{
STANDARD20_MODULE_STUFF,
NULL,
NULL,
NULL,
NULL,
directives,
hooks
};
*/
import "C"
func main() {}