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

Function SecretDirectory

server/server.go:898–903  ·  view source on GitHub ↗

SecretDirectory returns the directory DuckDB should use for persistent secrets for this instance, or "" to leave DuckDB's default in place. DuckDB defaults persistent secrets to $HOME/.duckdb/stored_secrets, independent of the database file. On a worker that means a CREATE PERSISTENT SECRET lands i

(cfg Config)

Source from the content-addressed store, hash-verified

896// When the last reference is released, the DB is closed and removed from the pool.
897func (s *Server) releaseFileDB(username string) {
898 s.fileDBsMu.Lock()
899 defer s.fileDBsMu.Unlock()
900
901 entry, ok := s.fileDBs[username]
902 if !ok {
903 return
904 }
905 entry.refs--
906 if entry.refs <= 0 {

Callers 5

wipePersistedSecretsFunction · 0.92
TestPinSecretDirectoryFunction · 0.85
TestSecretDirectoryFunction · 0.85
ConfigureMainDBFunction · 0.85

Calls

no outgoing calls

Tested by 3

TestPinSecretDirectoryFunction · 0.68
TestSecretDirectoryFunction · 0.68