Documentation
¶
Overview ¶
Package portmap remembers which TCP port each project directory serves on, so starting the same project always reuses the same port instead of drifting to whatever happens to be free at the time (the server walks past a busy port, so without memory a project's port depends on start order).
The mapping is a machine-local registry at ~/.ogcode/ports.json — a JSON object of absolute-project-dir -> port, sitting beside the global config DB. It is deliberately NOT the project-local ogcode.json: an auto-assigned port is per-machine state, not shareable project configuration.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SuggestStart ¶
SuggestStart returns a starting port for a project that has no recorded port yet: base itself when no other project has claimed it, otherwise the next port above base that no other project claims. It only avoids collisions with other projects' recorded ports — actual bind availability is left to the server, which walks past a transiently busy port on its own.
Types ¶
This section is empty.