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.
This commit is contained in:
@@ -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_ */
|
||||
|
||||
Reference in New Issue
Block a user