summaryrefslogtreecommitdiffhomepage
path: root/src/go/unit/nxt_go_lib.h
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2017-12-13 18:12:13 +0300
committerMax Romanov <max.romanov@nginx.com>2017-12-13 18:12:13 +0300
commit799cff5f3e226d8a82a767714c59815939a989dd (patch)
treea844660aba1423de68726f55a83cdbe6a7d49d82 /src/go/unit/nxt_go_lib.h
parentb680e944d65d56e92919287247bd47e13ad030e9 (diff)
downloadunit-799cff5f3e226d8a82a767714c59815939a989dd.tar.gz
unit-799cff5f3e226d8a82a767714c59815939a989dd.tar.bz2
Introducing Unit version check in Go package.
To communicate with the Go program, Unit setup environment variable named NXT_GO_PORTS with value contains Unit version, stream id to confirm application is started, and Unit ports information. Go Unit package parses this string and compares runtime version with compile time version. In case of parse error or version mismatch, ListenAndServe() returns with the error.
Diffstat (limited to 'src/go/unit/nxt_go_lib.h')
-rw-r--r--src/go/unit/nxt_go_lib.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/go/unit/nxt_go_lib.h b/src/go/unit/nxt_go_lib.h
index 33acf334..aecdd4af 100644
--- a/src/go/unit/nxt_go_lib.h
+++ b/src/go/unit/nxt_go_lib.h
@@ -30,10 +30,12 @@ int nxt_go_request_close(nxt_go_request_t r);
int nxt_go_request_done(nxt_go_request_t r);
-void nxt_go_ready();
+void nxt_go_ready(uint32_t stream);
nxt_go_request_t nxt_go_process_port_msg(uintptr_t buf, size_t buf_len,
uintptr_t oob, size_t oob_len);
+const char *nxt_go_version();
+
#endif /* _NXT_GO_LIB_H_INCLUDED_ */