Versions in this module Expand all Collapse all v1 v1.0.0 Oct 25, 2023 Changes in this version + const ErrAttributes + const ErrKeyword + const ErrNotFound + const ErrZero + var ErrNotFoundKeyword = errs.WithDomain(errDomain, ErrNotFound, ErrKeyword) + var ErrZeroAttributes = errs.WithDomain(errDomain, ErrZero, ErrAttributes) + func WithLogHandler(handler slog.Handler) cfg.Option[Config] + func WithLogger(logger *slog.Logger) cfg.Option[Config] + func WithMetrics(metrics Metrics) cfg.Option[Config] + func WithTrace(tracer trace.Tracer) cfg.Option[Config] + func WithURI(uri string) cfg.Option[Config] + type Attribute struct + Key K + Value V + type Char interface + type Config struct + type Index struct + func NewIndex(uri string, attrs ...Attribute[K, V]) (*Index[K, V], error) + func (i *Index[K, V]) Delete(ctx context.Context, keys ...K) error + func (i *Index[K, V]) Insert(ctx context.Context, attrs ...Attribute[K, V]) error + func (i *Index[K, V]) Search(ctx context.Context, searchTerm V) (res []Attribute[K, V], err error) + func (i *Index[K, V]) Shutdown(_ context.Context) error + type Indexer interface + Delete func(ctx context.Context, keys ...K) error + Insert func(ctx context.Context, attrs ...Attribute[K, V]) error + Search func(ctx context.Context, searchTerm V) (res []Attribute[K, V], err error) + Shutdown func(ctx context.Context) error + func IndexerWithLogs(indexer Indexer[K, V], handler slog.Handler) Indexer[K, V] + func IndexerWithMetrics(indexer Indexer[K, V], m Metrics) Indexer[K, V] + func IndexerWithTrace(indexer Indexer[K, V], tracer trace.Tracer) Indexer[K, V] + func New(attributes []Attribute[K, V], opts ...cfg.Option[Config]) (Indexer[K, V], error) + func NoOp() Indexer[K, V] + type Metrics interface + IncDeletesFailed func() + IncDeletesTotal func() + IncInsertsFailed func() + IncInsertsTotal func() + IncSearchesFailed func() + IncSearchesTotal func() + ObserveDeleteLatency func(ctx context.Context, dur time.Duration) + ObserveInsertLatency func(ctx context.Context, dur time.Duration) + ObserveSearchLatency func(ctx context.Context, dur time.Duration) + type Number interface + type SQLNullable interface + type SQLType interface