registry

package
v2.2.10 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2022 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAlreadyDefined = fmt.Errorf("item already defined")

Functions

func AnalyzerBuild

func AnalyzerBuild(name string, config map[string]interface{}, cache *Cache) (interface{}, error)

func AnalyzerTypesAndInstances

func AnalyzerTypesAndInstances() ([]string, []string)

func CharFilterBuild

func CharFilterBuild(name string, config map[string]interface{}, cache *Cache) (interface{}, error)

func CharFilterTypesAndInstances

func CharFilterTypesAndInstances() ([]string, []string)

func DateTimeParserBuild

func DateTimeParserBuild(name string, config map[string]interface{}, cache *Cache) (interface{}, error)

func DateTimeParserTypesAndInstances

func DateTimeParserTypesAndInstances() ([]string, []string)

func FragmentFormatterBuild

func FragmentFormatterBuild(name string, config map[string]interface{}, cache *Cache) (interface{}, error)

func FragmentFormatterTypesAndInstances

func FragmentFormatterTypesAndInstances() ([]string, []string)

func FragmenterBuild

func FragmenterBuild(name string, config map[string]interface{}, cache *Cache) (interface{}, error)

func FragmenterTypesAndInstances

func FragmenterTypesAndInstances() ([]string, []string)

func HighlighterBuild

func HighlighterBuild(name string, config map[string]interface{}, cache *Cache) (interface{}, error)

func HighlighterTypesAndInstances

func HighlighterTypesAndInstances() ([]string, []string)

func IndexTypesAndInstances

func IndexTypesAndInstances() ([]string, []string)

func KVStoreTypesAndInstances

func KVStoreTypesAndInstances() ([]string, []string)

func RegisterAnalyzer

func RegisterAnalyzer(name string, constructor AnalyzerConstructor)

func RegisterCharFilter

func RegisterCharFilter(name string, constructor CharFilterConstructor)

func RegisterDateTimeParser

func RegisterDateTimeParser(name string, constructor DateTimeParserConstructor)

func RegisterFragmentFormatter

func RegisterFragmentFormatter(name string, constructor FragmentFormatterConstructor)

func RegisterFragmenter

func RegisterFragmenter(name string, constructor FragmenterConstructor)

func RegisterHighlighter

func RegisterHighlighter(name string, constructor HighlighterConstructor)

func RegisterIndexType

func RegisterIndexType(name string, constructor IndexTypeConstructor)

func RegisterKVStore

func RegisterKVStore(name string, constructor KVStoreConstructor)

func RegisterTokenFilter

func RegisterTokenFilter(name string, constructor TokenFilterConstructor)

func RegisterTokenMap

func RegisterTokenMap(name string, constructor TokenMapConstructor)

func RegisterTokenizer

func RegisterTokenizer(name string, constructor TokenizerConstructor)

func TokenFilterBuild

func TokenFilterBuild(name string, config map[string]interface{}, cache *Cache) (interface{}, error)

func TokenFilterTypesAndInstances

func TokenFilterTypesAndInstances() ([]string, []string)

func TokenMapBuild

func TokenMapBuild(name string, config map[string]interface{}, cache *Cache) (interface{}, error)

func TokenMapTypesAndInstances

func TokenMapTypesAndInstances() ([]string, []string)

func TokenizerBuild

func TokenizerBuild(name string, config map[string]interface{}, cache *Cache) (interface{}, error)

func TokenizerTypesAndInstances

func TokenizerTypesAndInstances() ([]string, []string)

Types

type AnalyzerCache

type AnalyzerCache struct {
	*ConcurrentCache
}

func NewAnalyzerCache

func NewAnalyzerCache() *AnalyzerCache

func (*AnalyzerCache) AnalyzerNamed

func (c *AnalyzerCache) AnalyzerNamed(name string, cache *Cache) (*analysis.Analyzer, error)

func (*AnalyzerCache) DefineAnalyzer

func (c *AnalyzerCache) DefineAnalyzer(name string, typ string, config map[string]interface{}, cache *Cache) (*analysis.Analyzer, error)

type AnalyzerConstructor

type AnalyzerConstructor func(config map[string]interface{}, cache *Cache) (*analysis.Analyzer, error)

type AnalyzerRegistry

type AnalyzerRegistry map[string]AnalyzerConstructor

type Cache

type Cache struct {
	CharFilters        *CharFilterCache
	Tokenizers         *TokenizerCache
	TokenMaps          *TokenMapCache
	TokenFilters       *TokenFilterCache
	Analyzers          *AnalyzerCache
	DateTimeParsers    *DateTimeParserCache
	FragmentFormatters *FragmentFormatterCache
	Fragmenters        *FragmenterCache
	Highlighters       *HighlighterCache
}

func NewCache

func NewCache() *Cache

func (*Cache) AnalyzerNamed

func (c *Cache) AnalyzerNamed(name string) (*analysis.Analyzer, error)

func (*Cache) CharFilterNamed

func (c *Cache) CharFilterNamed(name string) (analysis.CharFilter, error)

func (*Cache) DateTimeParserNamed

func (c *Cache) DateTimeParserNamed(name string) (analysis.DateTimeParser, error)

func (*Cache) DefineAnalyzer

func (c *Cache) DefineAnalyzer(name string, config map[string]interface{}) (*analysis.Analyzer, error)

func (*Cache) DefineCharFilter

func (c *Cache) DefineCharFilter(name string, config map[string]interface{}) (analysis.CharFilter, error)

func (*Cache) DefineDateTimeParser

func (c *Cache) DefineDateTimeParser(name string, config map[string]interface{}) (analysis.DateTimeParser, error)

func (*Cache) DefineFragmentFormatter

func (c *Cache) DefineFragmentFormatter(name string, config map[string]interface{}) (highlight.FragmentFormatter, error)

func (*Cache) DefineFragmenter

func (c *Cache) DefineFragmenter(name string, config map[string]interface{}) (highlight.Fragmenter, error)

func (*Cache) DefineHighlighter

func (c *Cache) DefineHighlighter(name string, config map[string]interface{}) (highlight.Highlighter, error)

func (*Cache) DefineTokenFilter

func (c *Cache) DefineTokenFilter(name string, config map[string]interface{}) (analysis.TokenFilter, error)

func (*Cache) DefineTokenMap

func (c *Cache) DefineTokenMap(name string, config map[string]interface{}) (analysis.TokenMap, error)

func (*Cache) DefineTokenizer

func (c *Cache) DefineTokenizer(name string, config map[string]interface{}) (analysis.Tokenizer, error)

func (*Cache) FragmentFormatterNamed

func (c *Cache) FragmentFormatterNamed(name string) (highlight.FragmentFormatter, error)

func (*Cache) FragmenterNamed

func (c *Cache) FragmenterNamed(name string) (highlight.Fragmenter, error)

func (*Cache) HighlighterNamed

func (c *Cache) HighlighterNamed(name string) (highlight.Highlighter, error)

func (*Cache) TokenFilterNamed

func (c *Cache) TokenFilterNamed(name string) (analysis.TokenFilter, error)

func (*Cache) TokenMapNamed

func (c *Cache) TokenMapNamed(name string) (analysis.TokenMap, error)

func (*Cache) TokenizerNamed

func (c *Cache) TokenizerNamed(name string) (analysis.Tokenizer, error)

type CacheBuild

type CacheBuild func(name string, config map[string]interface{}, cache *Cache) (interface{}, error)

type CharFilterCache

type CharFilterCache struct {
	*ConcurrentCache
}

func NewCharFilterCache

func NewCharFilterCache() *CharFilterCache

func (*CharFilterCache) CharFilterNamed

func (c *CharFilterCache) CharFilterNamed(name string, cache *Cache) (analysis.CharFilter, error)

func (*CharFilterCache) DefineCharFilter

func (c *CharFilterCache) DefineCharFilter(name string, typ string, config map[string]interface{}, cache *Cache) (analysis.CharFilter, error)

type CharFilterConstructor

type CharFilterConstructor func(config map[string]interface{}, cache *Cache) (analysis.CharFilter, error)

type CharFilterRegistry

type CharFilterRegistry map[string]CharFilterConstructor

type ConcurrentCache

type ConcurrentCache struct {
	// contains filtered or unexported fields
}

func NewConcurrentCache

func NewConcurrentCache() *ConcurrentCache

func (*ConcurrentCache) DefineItem

func (c *ConcurrentCache) DefineItem(name string, typ string, config map[string]interface{}, cache *Cache, build CacheBuild) (interface{}, error)

func (*ConcurrentCache) ItemNamed

func (c *ConcurrentCache) ItemNamed(name string, cache *Cache, build CacheBuild) (interface{}, error)

type DateTimeParserCache

type DateTimeParserCache struct {
	*ConcurrentCache
}

func NewDateTimeParserCache

func NewDateTimeParserCache() *DateTimeParserCache

func (*DateTimeParserCache) DateTimeParserNamed

func (c *DateTimeParserCache) DateTimeParserNamed(name string, cache *Cache) (analysis.DateTimeParser, error)

func (*DateTimeParserCache) DefineDateTimeParser

func (c *DateTimeParserCache) DefineDateTimeParser(name string, typ string, config map[string]interface{}, cache *Cache) (analysis.DateTimeParser, error)

type DateTimeParserConstructor

type DateTimeParserConstructor func(config map[string]interface{}, cache *Cache) (analysis.DateTimeParser, error)

type DateTimeParserRegistry

type DateTimeParserRegistry map[string]DateTimeParserConstructor

type FragmentFormatterCache

type FragmentFormatterCache struct {
	*ConcurrentCache
}

func NewFragmentFormatterCache

func NewFragmentFormatterCache() *FragmentFormatterCache

func (*FragmentFormatterCache) DefineFragmentFormatter

func (c *FragmentFormatterCache) DefineFragmentFormatter(name string, typ string, config map[string]interface{}, cache *Cache) (highlight.FragmentFormatter, error)

func (*FragmentFormatterCache) FragmentFormatterNamed

func (c *FragmentFormatterCache) FragmentFormatterNamed(name string, cache *Cache) (highlight.FragmentFormatter, error)

type FragmentFormatterConstructor

type FragmentFormatterConstructor func(config map[string]interface{}, cache *Cache) (highlight.FragmentFormatter, error)

type FragmentFormatterRegistry

type FragmentFormatterRegistry map[string]FragmentFormatterConstructor

type FragmenterCache

type FragmenterCache struct {
	*ConcurrentCache
}

func NewFragmenterCache

func NewFragmenterCache() *FragmenterCache

func (*FragmenterCache) DefineFragmenter

func (c *FragmenterCache) DefineFragmenter(name string, typ string, config map[string]interface{}, cache *Cache) (highlight.Fragmenter, error)

func (*FragmenterCache) FragmenterNamed

func (c *FragmenterCache) FragmenterNamed(name string, cache *Cache) (highlight.Fragmenter, error)

type FragmenterConstructor

type FragmenterConstructor func(config map[string]interface{}, cache *Cache) (highlight.Fragmenter, error)

type FragmenterRegistry

type FragmenterRegistry map[string]FragmenterConstructor

type HighlighterCache

type HighlighterCache struct {
	*ConcurrentCache
}

func NewHighlighterCache

func NewHighlighterCache() *HighlighterCache

func (*HighlighterCache) DefineHighlighter

func (c *HighlighterCache) DefineHighlighter(name string, typ string, config map[string]interface{}, cache *Cache) (highlight.Highlighter, error)

func (*HighlighterCache) HighlighterNamed

func (c *HighlighterCache) HighlighterNamed(name string, cache *Cache) (highlight.Highlighter, error)

type HighlighterConstructor

type HighlighterConstructor func(config map[string]interface{}, cache *Cache) (highlight.Highlighter, error)

type HighlighterRegistry

type HighlighterRegistry map[string]HighlighterConstructor

type IndexTypeConstructor

type IndexTypeConstructor func(storeName string, storeConfig map[string]interface{}, analysisQueue *index.AnalysisQueue) (index.Index, error)

func IndexTypeConstructorByName

func IndexTypeConstructorByName(name string) IndexTypeConstructor

type IndexTypeRegistry

type IndexTypeRegistry map[string]IndexTypeConstructor

type KVStoreConstructor

type KVStoreConstructor func(mo store.MergeOperator, config map[string]interface{}) (store.KVStore, error)

KVStoreConstructor is used to build a KVStore of a specific type when specificied by the index configuration. In addition to meeting the store.KVStore interface, KVStores must also support this constructor. Note that currently the values of config must be able to be marshaled and unmarshaled using the encoding/json library (used when reading/writing the index metadata file).

func KVStoreConstructorByName

func KVStoreConstructorByName(name string) KVStoreConstructor

type KVStoreRegistry

type KVStoreRegistry map[string]KVStoreConstructor

type TokenFilterCache

type TokenFilterCache struct {
	*ConcurrentCache
}

func NewTokenFilterCache

func NewTokenFilterCache() *TokenFilterCache

func (*TokenFilterCache) DefineTokenFilter

func (c *TokenFilterCache) DefineTokenFilter(name string, typ string, config map[string]interface{}, cache *Cache) (analysis.TokenFilter, error)

func (*TokenFilterCache) TokenFilterNamed

func (c *TokenFilterCache) TokenFilterNamed(name string, cache *Cache) (analysis.TokenFilter, error)

type TokenFilterConstructor

type TokenFilterConstructor func(config map[string]interface{}, cache *Cache) (analysis.TokenFilter, error)

type TokenFilterRegistry

type TokenFilterRegistry map[string]TokenFilterConstructor

type TokenMapCache

type TokenMapCache struct {
	*ConcurrentCache
}

func NewTokenMapCache

func NewTokenMapCache() *TokenMapCache

func (*TokenMapCache) DefineTokenMap

func (c *TokenMapCache) DefineTokenMap(name string, typ string, config map[string]interface{}, cache *Cache) (analysis.TokenMap, error)

func (*TokenMapCache) TokenMapNamed

func (c *TokenMapCache) TokenMapNamed(name string, cache *Cache) (analysis.TokenMap, error)

type TokenMapConstructor

type TokenMapConstructor func(config map[string]interface{}, cache *Cache) (analysis.TokenMap, error)

type TokenMapRegistry

type TokenMapRegistry map[string]TokenMapConstructor

type TokenizerCache

type TokenizerCache struct {
	*ConcurrentCache
}

func NewTokenizerCache

func NewTokenizerCache() *TokenizerCache

func (*TokenizerCache) DefineTokenizer

func (c *TokenizerCache) DefineTokenizer(name string, typ string, config map[string]interface{}, cache *Cache) (analysis.Tokenizer, error)

func (*TokenizerCache) TokenizerNamed

func (c *TokenizerCache) TokenizerNamed(name string, cache *Cache) (analysis.Tokenizer, error)

type TokenizerConstructor

type TokenizerConstructor func(config map[string]interface{}, cache *Cache) (analysis.Tokenizer, error)

type TokenizerRegistry

type TokenizerRegistry map[string]TokenizerConstructor

Jump to

Keyboard shortcuts

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