Documentation
¶
Index ¶
- type Config
- type Server
- func (s *Server) BrokerSocket() string
- func (s *Server) DB() *sql.DB
- func (s *Server) GatewayURL() string
- func (s *Server) HostCommands() map[string]orchestrator.HostCommandSpec
- func (s *Server) KitsDir() string
- func (s *Server) ProxyPort() int
- func (s *Server) ReloadHostCommands() error
- func (s *Server) Router() chi.Router
- func (s *Server) SocketPath() string
- func (s *Server) Start(ctx context.Context) error
- func (s *Server) Stop() error
- func (s *Server) Store() *orchestrator.ProjectStore
- func (s *Server) TCPAddr() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
DBPath string
SocketPath string
HTTPAddr string
KitsDir string // base dir for installed kit repos
KeyFilePath string // path to secret encryption key file
AllowedDomains []string // proxy allowed domains
JobRuntime dispatcher.JobRuntime
}
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) BrokerSocket ¶
BrokerSocket returns the broker UNIX socket path.
func (*Server) GatewayURL ¶ added in v0.0.10
GatewayURL returns the git gateway's sandbox-facing base URL (http://10.0.2.2:<port>), or "" before Start has bound its listener. docs/plans/git-gateway-cutover.md PR4 wires this into SandboxRuntimeInfo.GatewayURL (via dispatcher.WireConfig.GatewayURL), but nothing consumes it yet — the sandbox env var advertise and the runner clone sequence are PR6/PR5.
func (*Server) HostCommands ¶ added in v0.0.13
func (s *Server) HostCommands() map[string]orchestrator.HostCommandSpec
HostCommands returns a deep-copy snapshot of the aggregated host_commands config assembled at startup from every installed kit.yaml (docs/plans/workspace-db-consolidation.md PR2). It is read-only reference data during PR2/PR3's parity-verification window — nothing dispatches through it yet. A snapshot (rather than the live internal map) is returned so a caller mutating the result can never corrupt daemon state, and so a future reload API (PR4) can safely swap s.hostCommands without racing against an in-flight caller.
func (*Server) KitsDir ¶ added in v0.0.13
KitsDir returns this daemon's effective base directory for installed kits (MAJOR 1, codex review round 1, docs/plans/workspace-db-consolidation.md Phase 2.5 PR7): s.cfg is set once in New() and never mutated afterward, so no locking is needed, unlike the mutable s.hostCommands snapshot below. Backs GET /api/config/kits-dir (api.ConfigService) so a CLI client-side helper can resolve a legacy workspace.yaml's `kits:` references against the running daemon's actual kits directory, including one overridden by `boid start --kits-dir <custom>`.
func (*Server) ReloadHostCommands ¶ added in v0.0.13
ReloadHostCommands re-reads the aggregated host_commands.yaml config from disk and swaps in both the raw snapshot (what HostCommands() hands out) and the dispatch-facing expanded copy wired into the ProjectStore (docs/plans/workspace-db-consolidation.md PR4 Step G). This is the daemon-side half of the plan doc's documented hand-edit path ("host_commands 実定義の集約先": 手で ~/.config/boid/host_commands.yaml を編集 → boid host-commands reload で daemon に読み直させる) — there is no create/edit API for individual host_command entries, only this reload.
A parse error (a typo introduced by the hand edit) is returned as-is and leaves the daemon's live config untouched — s.hostCommands and the store's copy are only swapped after LoadHostCommandsConfig succeeds, so a bad reload never degrades an already-running daemon.
func (*Server) SocketPath ¶
SocketPath returns the UNIX socket path.
func (*Server) Store ¶
func (s *Server) Store() *orchestrator.ProjectStore
Store returns the project store.