MCPcopy Create free account
hub / github.com/PostHog/duckgres / ChildConfig

Struct ChildConfig

server/worker.go:35–66  ·  view source on GitHub ↗

ChildConfig contains all configuration needed by a child worker process. It is passed from parent to child via the DUCKGRES_CHILD_CONFIG env var as JSON.

Source from the content-addressed store, hash-verified

33// ChildConfig contains all configuration needed by a child worker process.
34// It is passed from parent to child via the DUCKGRES_CHILD_CONFIG env var as JSON.
35type ChildConfig struct {
36 // Connection info (RemoteAddr is known at spawn time; Username/Database are read after TLS)
37 RemoteAddr string `json:"remote_addr"`
38
39 // Server config
40 DataDir string `json:"data_dir"`
41 Extensions []string `json:"extensions"`
42 IdleTimeout int64 `json:"idle_timeout"` // nanoseconds
43 ClientIdleTimeoutMax int64 `json:"client_idle_timeout_max"` // nanoseconds
44
45 // TLS config
46 TLSCertFile string `json:"tls_cert_file"`
47 TLSKeyFile string `json:"tls_key_file"`
48
49 // DuckLake config
50 DuckLake DuckLakeConfig `json:"ducklake"`
51
52 // Authentication - map of username -> password
53 // Child will look up after reading username from startup message
54 Users map[string]string `json:"users"`
55
56 // Backend key (pre-generated by parent for cancel request routing)
57 // BackendPid is set to child's actual PID after fork
58 BackendSecretKey int32 `json:"backend_secret_key"`
59
60 // ServerStartTime is the parent server's start time (Unix nanoseconds).
61 // Used to distinguish server uptime from child process uptime.
62 ServerStartTime int64 `json:"server_start_time"`
63
64 // ServerVersion is the parent server's version string.
65 // Used to distinguish control_plane_version() from worker_version().
66 ServerVersion string `json:"server_version,omitempty"`
67}
68
69// RunChildMode is the entry point for child worker processes.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected