Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PostHog/duckgres
/ functions
Functions
5,901 in github.com/PostHog/duckgres
⨍
Functions
5,901
◇
Types & classes
803
↓ 2 callers
Method
OwnerCPInstanceID
OwnerCPInstanceID returns the control-plane id that owns the worker under this lease.
controlplane/configstore/lifecycle_types.go:115
↓ 2 callers
Method
OwnerEpoch
OwnerEpoch returns the epoch this lease was minted at. Subsequent epoch-bumping operations (e.g. RefreshLease) produce a new lease; the previous one b
controlplane/configstore/lifecycle_types.go:120
↓ 2 callers
Function
ParseQualifiedIdentifier
ParseQualifiedIdentifier splits a one-or-more-part SQL identifier, preserving quoted identifier case and lowercasing unquoted identifiers.
server/sqlcore/identifier.go:7
↓ 2 callers
Function
PrepareArtifactDir
(dir string)
tests/scenario/core/artifacts.go:69
↓ 2 callers
Method
Provision
Provision is the all-or-nothing entrypoint for POST /provision — wraps warehouse + root-user writes in a single configstore transaction so partial fai
controlplane/provisioning/api.go:79
↓ 2 callers
Method
Provision
(ctx context.Context, orgID string, request map[string]any)
tests/scenario/provision/client.go:100
↓ 2 callers
Method
PruneWorkerSpawnLog
(olderThan time.Time)
controlplane/headroom.go:69
↓ 2 callers
Method
QueryContext
(ctx context.Context, query string, args ...any)
server/flightclient/flight_executor.go:170
↓ 2 callers
Method
QueryContext
(ctx context.Context, query string, args ...any)
duckdbservice/arrow_helpers.go:119
↓ 2 callers
Method
Ready
Ready reports whether secrets can be persisted (e.g. the encryption key is configured). A non-nil error is shown to the client.
server/conn_user_secrets.go:19
↓ 2 callers
Method
RecentErrors
RecentErrors returns up to limit of THIS replica's most recent redacted query errors, newest first. Each error is captured on the CP that owned the fa
controlplane/admin/live.go:150
↓ 2 callers
Method
ReconnectFlightWorker
(ctx context.Context, workerID int, ownerEpoch int64)
controlplane/org_reserved_pool.go:503
↓ 2 callers
Method
Record
Record forwards a connection-end record to the in-process counter. Best-effort.
controlplane/compute_meter.go:168
↓ 2 callers
Method
Record
(result QueryResult)
tests/perf/core/sink.go:58
↓ 2 callers
Method
RecordWorkerSpawn
(orgID string, cpuMillis, memBytes int64)
controlplane/headroom.go:67
↓ 2 callers
Function
RedactForArtifact
(v any)
tests/scenario/provision/redact.go:16
↓ 2 callers
Function
RefreshS3Secret
RefreshS3Secret replaces the DuckDB S3 secret with updated credentials. Used when a hot-idle worker is reclaimed and STS credentials have rotated. Res
server/server.go:2029
↓ 2 callers
Function
RegisterAPI
RegisterAPI registers provisioning endpoints on the given router group. bucketSuffix is the env suffix used to compute the control-plane-owned per-org
controlplane/provisioning/api.go:91
↓ 2 callers
Function
RegisterDucklingsMetadata
RegisterDucklingsMetadata wires GET /ducklings/metadata: the live metadata-store backend of every Duckling CR (notably the current cnpg shard), keyed
controlplane/admin/ducklings_metadata.go:47
↓ 2 callers
Method
RegisterQuery
RegisterQuery registers a cancel function for a backend key. This allows the query to be cancelled via a cancel request from another connection.
server/server.go:704
↓ 2 callers
Function
RegisterUI
RegisterUI serves the embedded SPA on the engine: real files (index.html, assets/*) are served directly; any other non-API GET falls back to index.htm
controlplane/admin/embed_ui.go:40
↓ 2 callers
Function
RegisterValueNormalizer
[]ValueNormalizer RegisterValueNormalizer adds a hook consulted by normalizeDriverValue before the binary encoders dispatch on the value's type. Inten
server/value_normalize.go:25
↓ 2 callers
Method
ReleaseWorker
(id int)
controlplane/org_reserved_pool.go:322
↓ 2 callers
Method
RemoteAddr
()
controlplane/control_test.go:22
↓ 2 callers
Method
ResolvePostgresConnection
(startupDatabase, sniPrefix string, useManagedSNI bool, username, password string)
controlplane/control.go:227
↓ 2 callers
Method
ResolveSNIPrefix
translates SNI hostname prefix → canonical database_name (alias-aware) ResolveSNIPrefix maps a managed hostname prefix to its org and database. It acc
controlplane/control.go:226
↓ 2 callers
Method
ResolveSNIPrefix
ResolveSNIPrefix maps a managed-hostname prefix to the org/database it names. It accepts all supported public hostname labels: - hostname_alias, when
controlplane/configstore/store.go:317
↓ 2 callers
Method
Result
(stepID string)
tests/scenario/perf/steps.go:120
↓ 2 callers
Method
RetireDrainingWorker
(workerID int, ownerCPInstanceID string, expectedOwnerEpoch int64, reason string)
controlplane/worker_lifecycle.go:40
↓ 2 callers
Method
RetireIdleVariantFromSnapshot
RetireIdleVariantFromSnapshot retires a worker observed as idle or hot_idle, fenced by the snapshot. The state restriction maps onto the legacy Retire
controlplane/worker_lifecycle.go:185
↓ 2 callers
Method
RetireWorkerIfNoSessions
RetireWorkerIfNoSessions retires a worker only if it has no active sessions after releasing our claim. Used to clean up on session creation failure wi
controlplane/worker_mgr.go:961
↓ 2 callers
Method
Run
(ctx context.Context)
controlplane/credential_refresh_scheduler.go:42
↓ 2 callers
Function
RunControlPlane
RunControlPlane is the entry point for the control plane process.
controlplane/control.go:265
↓ 2 callers
Function
SNIFromContext
SNIFromContext returns the TLS ServerName (SNI) the client sent, or "" if the connection isn't TLS-terminated by this server (e.g. in unit tests). Exp
server/flightsqlingress/ingress.go:485
↓ 2 callers
Method
Seal
Seal encrypts a secret statement for storage on the (org, user, name) row.
server/usersecrets/crypto.go:64
↓ 2 callers
Method
SessionForWorker
SessionForWorker returns the session bound to the given cluster-unique worker id, or ok=false if this stack has none. One session per worker, so the f
controlplane/session_mgr.go:954
↓ 2 callers
Method
SetControlMetadata
(workerID int, cpInstanceID string, ownerEpoch int64)
server/flightclient/flight_executor.go:149
↓ 2 callers
Method
SetDraining
(draining bool)
server/flightsqlingress/ingress.go:1814
↓ 2 callers
Method
SetHeader
(md metadata.MD)
server/flightsqlingress/ingress_test.go:246
↓ 2 callers
Method
SetOrgUserDisabled
(orgID, username string, disabled bool)
controlplane/admin/live.go:158
↓ 2 callers
Method
SetResourceLimitsProvider
SetResourceLimitsProvider installs the dynamic org/user resource-limit lookup used by the runtime limiter. The callback must be safe for concurrent us
controlplane/session_mgr.go:171
↓ 2 callers
Method
SetSessionLister
SetSessionLister sets the session lister after construction. Must be called before any Rebalance calls (i.e., before accepting connections).
controlplane/memory_rebalancer.go:93
↓ 2 callers
Method
SetTrailer
(md metadata.MD)
server/flightsqlingress/ingress_test.go:255
↓ 2 callers
Method
Shutdown
Shutdown stops accepting new Flight connections and cleans up sessions.
server/flightsqlingress/ingress.go:298
↓ 2 callers
Method
ShutdownAll
ShutdownAll stops all workers gracefully.
controlplane/worker_mgr.go:1045
↓ 2 callers
Method
Start
(ctx context.Context)
controlplane/runtime_tracker.go:45
↓ 2 callers
Function
StartDuckLakeInfraContainers
StartDuckLakeInfraContainers starts the local DuckLake metadata/object-store services.
tests/integration/harness.go:683
↓ 2 callers
Method
StartIdlePruner
StartIdlePruner closes cached DuckLake writers that have been idle beyond the resolver's idle TTL, even when no new Kafka events arrive to trigger pru
server/querylog_kafka_writer.go:836
↓ 2 callers
Method
State
()
tests/scenario/perf/steps.go:106
↓ 2 callers
Method
StoreStatus
(orgID string, status WarehouseStatus)
tests/scenario/provision/steps.go:70
↓ 2 callers
Function
StripLeadingComments
StripLeadingComments removes leading SQL comments from a query. Handles both block comments /* ... */ and line comments -- ...
server/sqlcore/query.go:20
↓ 2 callers
Method
TouchFlightSessionRecord
(sessionToken string, lastSeenAt time.Time)
controlplane/control.go:248
↓ 2 callers
Method
TransitionToHotIdleIfNoSessions
TransitionToHotIdleIfNoSessions decrements the worker's active session count and transitions a hot worker to hot_idle when its last session ends. The
controlplane/k8s_pool_lifecycle.go:147
↓ 2 callers
Function
TruncateForSpan
TruncateForSpan truncates a query string for use as a span attribute.
server/observe/tracing.go:29
↓ 2 callers
Method
UnregisterQuery
UnregisterQuery removes the cancel function for a backend key. This should be called when a query completes (successfully or with error).
server/server.go:712
↓ 2 callers
Method
UpdateOrgUserPassword
(orgID, username, passwordHash string)
controlplane/provisioning/api.go:82
↓ 2 callers
Method
UpdateProgress
UpdateProgress caches query progress data for sessions on the given worker. Called from the health check loop after parsing the worker's health check
controlplane/session_mgr.go:1022
↓ 2 callers
Method
UpsertSession
(record DurableSessionRecord)
server/flightsqlingress/ingress_test.go:136
↓ 2 callers
Function
ValidateManagedWarehouseSecretRefs
ValidateManagedWarehouseSecretRefs validates every secret reference carried by a managed-warehouse config against the tenant namespace/prefix rules.
controlplane/configstore/tenant_refs.go:62
↓ 2 callers
Function
ValidateMemoryLimit
ValidateMemoryLimit checks that a memory_limit string is a valid DuckDB size value.
server/sysinfo/sysinfo.go:96
↓ 2 callers
Method
ValidateOrgUser
ValidateOrgUser checks username/password scoped to a specific org.
controlplane/configstore/store.go:506
↓ 2 callers
Method
ValidateOrgUserAndGetPassthrough
ValidateOrgUserAndGetPassthrough validates credentials AND reads the passthrough flag against the same snapshot, eliminating the swap window that two
controlplane/configstore/store.go:546
↓ 2 callers
Function
WaitForDuckLakeInfra
WaitForDuckLakeInfra waits for DuckLake infrastructure to be ready
tests/integration/harness.go:730
↓ 2 callers
Method
WaitForZeroSessions
(ctx context.Context)
server/flightsqlingress/ingress.go:290
↓ 2 callers
Method
WaitWarehouseDeleted
(ctx context.Context, orgID string, opts WaitOptions)
tests/scenario/provision/client.go:131
↓ 2 callers
Method
Worker
(id int)
controlplane/org_reserved_pool.go:352
↓ 2 callers
Method
Worker
Worker returns a worker by ID.
controlplane/k8s_pool_acquire.go:131
↓ 2 callers
Function
WriteCommandComplete
writeCommandComplete sends a command completion message
server/wire/protocol.go:299
↓ 2 callers
Function
WriteCopyOutResponse
writeCopyOutResponse tells client we're about to send COPY data Format: overall format (0=text, 1=binary), num columns, format per column
server/wire/protocol.go:332
↓ 2 callers
Method
WriteMessages
(context.Context, ...queryLogKafkaMessage)
server/querylog_kafka.go:63
↓ 2 callers
Function
WriteNoticeResponse
writeNoticeResponse sends a notice/warning to the client Unlike errors, notices are informational and don't terminate the command
server/wire/protocol.go:274
↓ 2 callers
Method
WriteQueryLogKafkaEvent
(ctx context.Context, event QueryLogKafkaEvent)
server/querylog_kafka_writer.go:706
↓ 2 callers
Method
_post
(self, path: str, data: dict)
scripts/client-compat/report_client.py:26
↓ 2 callers
Function
acceptableSSOEmail
acceptableSSOEmail enforces the domain + verification hardening rules.
controlplane/admin/authz.go:147
↓ 2 callers
Function
acquireTotalOutcome
acquireTotalOutcome classifies an AcquireWorker error for the end-to-end histogram: ok | capacity (org/global cap backpressure) | canceled (client ctx
controlplane/acquire_metrics.go:110
↓ 2 callers
Method
addDropped
(msg QueryLogKafkaConsumedMessage, err error, now time.Time)
server/querylog_kafka_writer.go:542
↓ 2 callers
Function
addTrackedTransaction
(session *Session, txnKey string, ttx *trackedTx)
duckdbservice/flight_handler.go:147
↓ 2 callers
Function
add_file_delta
(plan: TestImpactPlan, status: str, path: str)
scripts/test_impact_plan.py:127
↓ 2 callers
Function
add_rename_delta
(plan: TestImpactPlan, previous_path: str, path: str)
scripts/test_impact_plan.py:195
↓ 2 callers
Function
add_warnings
(plan: TestImpactPlan)
scripts/test_impact_plan.py:365
↓ 2 callers
Function
age
(ts: string)
controlplane/admin/ui/src/pages/nodes/peepernetes.ts:116
↓ 2 callers
Method
allocateBackgroundSpawnIDLocked
()
controlplane/k8s_pool_helpers.go:31
↓ 2 callers
Method
allocateWorkerIDLocked
--- Helpers --- allocateWorkerID returns the next worker ID, using the shared generator if configured (multi-tenant mode) or the pool's internal count
controlplane/k8s_pool_helpers.go:22
↓ 2 callers
Function
analyze_patch_line
(plan: TestImpactPlan, path: str, line: str)
scripts/test_impact_plan.py:236
↓ 2 callers
Function
appColor
(key: string)
controlplane/admin/ui/src/pages/nodes/peepernetes.ts:145
↓ 2 callers
Method
appendEvent
(event string)
controlplane/session_mgr_drain_test.go:94
↓ 2 callers
Function
applyDuckLakePreAttachSettings
(db *sql.DB, dlCfg DuckLakeConfig)
server/server.go:1483
↓ 2 callers
Function
assertSpawnedWorkerPod
(t *testing.T, pod *corev1.Pod)
controlplane/k8s_pool_test.go:2953
↓ 2 callers
Function
attrValue
(s sdktrace.ReadOnlySpan, key string)
cmd/cache-proxy/tracing_test.go:48
↓ 2 callers
Function
auditActionFor
auditActionFor derives a resource-specific audit Action ("<resource>.<verb>") from the request method and path. It tolerates both the resolved path (c
controlplane/admin/audit.go:163
↓ 2 callers
Method
authenticateBasicCredentials
(ctx context.Context, md metadata.MD, remoteAddr net.Addr)
server/flightsqlingress/ingress.go:447
↓ 2 callers
Function
authenticateChildClient
authenticateChildClient runs the cleartext-password handshake for a child worker connection. The password is always requested before any credential ch
server/worker.go:136
↓ 2 callers
Function
backupHeader
(version string, targetVersion string)
server/ducklake/migration.go:427
↓ 2 callers
Method
batchInsertRows
appendWithDuckDBAppender uses the DuckDB Appender API for fast bulk inserts. Only works for full-column inserts (no column subset). batchInsertRows in
server/conn_copy.go:1122
↓ 2 callers
Method
beginCleanup
()
controlplane/session_lifecycle.go:52
↓ 2 callers
Method
beginSessionCreation
(ctx context.Context)
controlplane/session_mgr.go:536
↓ 2 callers
Method
beginTx
(ctx context.Context)
duckdbservice/service.go:370
↓ 2 callers
Function
booleanTestNode
(expr *pg_query.Node, boolTestType pg_query.BoolTestType, location int32)
transpiler/transform/boolpredicates.go:343
↓ 2 callers
Function
bootstrapSchema
(ctx context.Context, tx txHandle, schema string)
tests/perf/publisher/publisher.go:294
↓ 2 callers
Function
buildBindBody
buildBindBody constructs a Bind message body (without the 'B' type byte and length header): portal name, statement name, no format codes, one paramete
server/conn_bind_test.go:13
← previous
next →
1,401–1,500 of 5,901, ranked by callers