elastic

package
v1.10.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package elastic is Fabriq's native Elasticsearch search adapter.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SearchTargetName

func SearchTargetName(tenantID string, version int) string

SearchTargetName names the search projection's versioned rebuild target.

Types

type Adapter

type Adapter struct {
	*search.Adapter
	// contains filtered or unexported fields
}

Adapter implements the search query and projection ports using Elasticsearch.

func Open

func Open(ctx context.Context, cfg Config, reg *registry.Registry, opts ...Option) (*Adapter, error)

Open connects to Elasticsearch using its native product-checked transport.

func (*Adapter) Close added in v1.10.1

func (a *Adapter) Close() error

Close releases the native client's background resources and connections.

type Config

type Config struct {
	Addrs    []string
	Username string
	Password string
	CACert   []byte
}

Config locates the Elasticsearch cluster. CACert supplies PEM trust roots for HTTPS endpoints.

type ModelVersionResolver

type ModelVersionResolver = search.ModelVersionResolver

ModelVersionResolver reports the live search model version for a tenant.

type Option

type Option func(*Adapter)

Option customizes the adapter.

func WithModelVersionResolver

func WithModelVersionResolver(fn ModelVersionResolver) Option

WithModelVersionResolver wires the projection-state-backed live version.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL