Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/v1/qdrant.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Core Features:
- Vector similarity search with abstracted SearchResult interface
- Type\-safe collection creation and existence checks
- Support for payload metadata and optional vector retrieval
- Extensible abstraction layer for alternate vector stores \(e.g., Pinecone, Postgres\)
- Extensible abstraction layer for alternate vector stores \(e.g. pgVector\)

Basic Usage:

Expand Down
16 changes: 15 additions & 1 deletion v1/qdrant/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ func NewQdrantClient(p QdrantParams) (*QdrantClient, error) {
//
// It should be lightweight and fast — typically used during startup or readiness probes.
func (c *QdrantClient) healthCheck() error {
if !c.started {
return fmt.Errorf("[Qdrant] client not started")
}

ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second)
defer cancel()

Expand All @@ -114,15 +118,25 @@ func (c *QdrantClient) healthCheck() error {
return nil
}

// Client returns the underlying Qdrant SDK client.
// This is useful for direct access to low-level operations.
func (c *QdrantClient) Client() *qdrant.Client {
return c.api
}

// Close ──────────────────────────────────────────────────────────────
// Close
// ──────────────────────────────────────────────────────────────
//
// Close gracefully shuts down the Qdrant client.
//
// Since the official Qdrant Go SDK doesnt maintain persistent connections,
// Since the official Qdrant Go SDK doesn't maintain persistent connections,
// this is currently a no-op. It exists for lifecycle symmetry and future safety.
func (c *QdrantClient) Close() error {
if !c.started {
return nil
}

log.Println("[Qdrant] closing client (no-op)")
return nil
}
6 changes: 6 additions & 0 deletions v1/qdrant/configs.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ type Config struct {
// Optional authentication token for secured deployments.
ApiKey string `yaml:"api_key" env:"QDRANT_API_KEY"`

// ────────────────────────────────────────────────────────────────────────────
// Connection Settings
// ────────────────────────────────────────────────────────────────────────────
// Note: The following fields are reserved for future use.
// They are not currently passed to the Qdrant SDK client.

// Maximum request duration before timing out.
Timeout time.Duration `yaml:"timeout" env:"QDRANT_TIMEOUT"`

Expand Down
Loading