Documentation
¶
Overview ¶
usr/bin/env go run "$0" "$@"; exit bin/serve.go - async Go HTTP server for the 2dph brain (see bin/server).
KB_ROOT=/path/to/2dph ./bin/serve.go # serve the brain KB_SEARCH_CMD=... KB_WORKERS=4 KB_PORT=8630 ./bin/serve.go
Shebang trick: the first line is a Go `//` comment; when executed, env runs `go run "$0"` so this file doubles as an executable script. The real code lives in the importable package (module path, never a relative import). NOTE: never run `gofmt -w` on this file - it rewrites `//usr/bin/env` to `// usr/...` and breaks the shebang.
Directories
¶
| Path | Synopsis |
|---|---|
|
usr/bin/env go run "$0" "$@"; exit bin/kb/watch.go - re-index the 2dph brain when corpus files change.
|
usr/bin/env go run "$0" "$@"; exit bin/kb/watch.go - re-index the 2dph brain when corpus files change. |
|
usr/bin/env go run "$0" "$@"; exit bin/mail/sync.go - async download of OnlyOffice and Gmail mail to var/mail/.
|
usr/bin/env go run "$0" "$@"; exit bin/mail/sync.go - async download of OnlyOffice and Gmail mail to var/mail/. |
|
sync
Package synccmd wires the sync library to a CLI: reads .env, parses flags, picks sources, prints stats.
|
Package synccmd wires the sync library to a CLI: reads .env, parses flags, picks sources, prints stats. |
|
Package server serves the 2dph brain over HTTP.
|
Package server serves the 2dph brain over HTTP. |
|
Package watch polls corpus directories for changes and re-runs bin/kb/index.
|
Package watch polls corpus directories for changes and re-runs bin/kb/index. |
Click to show internal directories.
Click to hide internal directories.