forked from openresty/stream-lua-nginx-module
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathngx_stream_lua_api.h
More file actions
47 lines (26 loc) · 886 Bytes
/
ngx_stream_lua_api.h
File metadata and controls
47 lines (26 loc) · 886 Bytes
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
/*
* Copyright (C) Yichun Zhang (agentzh)
*/
#ifndef _NGX_STREAM_LUA_API_H_INCLUDED_
#define _NGX_STREAM_LUA_API_H_INCLUDED_
#include <nginx.h>
#include <ngx_core.h>
#include <ngx_stream.h>
#include <lua.h>
#include <stdint.h>
/* Public API for other Nginx modules */
#define ngx_stream_lua_version 10006
typedef struct {
uint8_t type;
union {
int b; /* boolean */
lua_Number n; /* number */
ngx_str_t s; /* string */
} value;
} ngx_stream_lua_value_t;
lua_State *ngx_stream_lua_get_global_state(ngx_conf_t *cf);
ngx_stream_session_t *ngx_stream_lua_get_session(lua_State *L);
ngx_int_t ngx_stream_lua_add_package_preload(ngx_conf_t *cf,
const char *package, lua_CFunction func);
ngx_shm_zone_t *ngx_stream_lua_find_zone(u_char *name_data, size_t name_len);
#endif /* _NGX_STREAM_LUA_API_H_INCLUDED_ */