diff options
author | Zhidao HONG <z.hong@f5.com> | 2023-05-08 16:00:25 +0800 |
---|---|---|
committer | Zhidao HONG <z.hong@f5.com> | 2023-05-08 16:00:25 +0800 |
commit | a3c3a29493798873ad04922bb2a7180b2ce267d5 (patch) | |
tree | 4332cbb50520c389d859db27e7266ffa53954b92 /src/nxt_script.h | |
parent | 56af7bb825c286e1a397f780bff9da275e5602ad (diff) | |
download | unit-a3c3a29493798873ad04922bb2a7180b2ce267d5.tar.gz unit-a3c3a29493798873ad04922bb2a7180b2ce267d5.tar.bz2 |
NJS: supported loadable modules.
Diffstat (limited to 'src/nxt_script.h')
-rw-r--r-- | src/nxt_script.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/nxt_script.h b/src/nxt_script.h new file mode 100644 index 00000000..ffefc108 --- /dev/null +++ b/src/nxt_script.h @@ -0,0 +1,37 @@ + +/* + * Copyright (C) NGINX, Inc. + * Copyright (C) Zhidao HONG + */ + +#ifndef _NXT_SCRIPT_INCLUDED_ +#define _NXT_SCRIPT_INCLUDED_ + + +typedef struct nxt_script_s nxt_script_t; + +nxt_script_t *nxt_script_new(nxt_task_t *task, nxt_str_t *name, u_char *data, + size_t size, u_char *error); +void nxt_script_destroy(nxt_script_t *script); + +void nxt_script_info_init(nxt_task_t *task, nxt_array_t *scripts); +nxt_int_t nxt_script_info_save(nxt_str_t *name, nxt_script_t *script); +nxt_conf_value_t *nxt_script_info_get(nxt_str_t *name); +nxt_conf_value_t *nxt_script_info_get_all(nxt_mp_t *mp); +nxt_int_t nxt_script_info_delete(nxt_str_t *name); + +nxt_array_t *nxt_script_store_load(nxt_task_t *task, nxt_mp_t *mem_pool); +void nxt_script_store_release(nxt_array_t *scripts); + +void nxt_script_store_get(nxt_task_t *task, nxt_str_t *name, nxt_mp_t *mp, + nxt_port_rpc_handler_t handler, void *ctx); +void nxt_script_store_delete(nxt_task_t *task, nxt_str_t *name, nxt_mp_t *mp); + +void nxt_script_store_get_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg); +void nxt_script_store_delete_handler(nxt_task_t *task, + nxt_port_recv_msg_t *msg); + +nxt_int_t nxt_script_file_read(nxt_fd_t fd, nxt_str_t *str); + + +#endif /* _NXT_SCRIPT_INCLUDED_ */ |