Commit graph

14 commits

Author SHA1 Message Date
Danielle De Leo
7e03a6cc6b Go: Add missing +build and go:build comments
A RHEL 8 test was failing because it uses go1.16. The old style must
be retained for backwards compat.

Fixes: 9a36de84c ("Go: Use Homebrew include paths")
Reviewed-by: Andrew Clayton <a.clayton@nginx.com>
Reviewed-by: Dylan Arbour <d.arbour@f5.com>
Signed-off-by: Danielle De Leo <d.deleo@f5.com>
2024-01-10 11:15:48 -05:00
Danielle De Leo
9a36de84c8
Go: Use Homebrew include paths
Fixes nginx/unit#967
2023-12-05 13:00:20 -05:00
Max Romanov
1297e8a16a Tests: using modules in Go. 2022-01-10 16:07:31 +03:00
Tiago Natel de Moura
ff6a7053f5 Introduced SCM_CREDENTIALS / SCM_CREDS in the socket control msgs. 2021-11-09 15:48:44 +03:00
Max Romanov
da0826e99f Go: fixing racing condition on app start.
Request procesing loop should be started in ready handler to avoid race
between go-routine start and context ready flag assignment.

The issue introduced in 43553aa72111.
2021-11-08 23:04:38 +03:00
Max Romanov
bba97134e9 Moving request limit control to libunit.
Introducting application graceful stop.  For now only used when application
process reach request limit value.

This closes #585 issue on GitHub.
2021-10-28 17:46:54 +03:00
Max Romanov
8132e1f700 Go: removing C proxy functions and re-using goroutines. 2020-11-18 22:33:53 +03:00
Max Romanov
8359560612 Introducing the shared application port.
This is the port shared between all application processes which use it to pass
requests for processing.  Using it significantly simplifies the request
processing code in the router.  The drawback is 2 more file descriptors per each
configured application and more complex libunit message wait/read code.
2020-08-11 19:20:15 +03:00
Max Romanov
bf647588ff Adding a reference counter to the libunit port structure.
The goal is to minimize the number of (pid, id) to port hash lookups which
require a library mutex lock.  The response port is found once per request,
while the read port is initialized at startup.
2020-08-11 19:20:06 +03:00
Max Romanov
ec3389b63b Libunit refactoring: port management.
- Changed the port management callbacks to notifications, which e. g. avoids
the need to call the libunit function
- Added context and library instance reference counts for a safer resource
release
- Added the router main port initialization
2020-08-11 19:19:55 +03:00
Max Romanov
58cc13ab29 Resolving a racing condition while adding ports on the app's side.
An earlier attempt (ad6265786871) to resolve this condition on the
router's side added a new issue: the app could get a request before
acquiring a port.
2020-04-10 16:21:58 +03:00
Max Romanov
0935630cba Fixing application process infinite loop.
Main process exiting before app process init may have caused hanging.
2020-03-30 14:18:51 +03:00
Max Romanov
26ee4cb6c8 Go: introducing SHM_ACK observer.
Each request processed in a separate goroutine.  In case of OOSM state,
during response write, request goroutine blocks on channel which waits
event from main thread about SHM_ACK message from router.
2019-12-24 18:04:21 +03:00
Max Romanov
f5a2984acf Go: moving source files to the root of the project.
This patch includes packaging changes related to files move.
2019-12-24 17:59:52 +03:00