registry

package
v0.0.0-...-609c32c Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2017 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IndexRegistry

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

IndexRegistry impelements index registry interface

func New

func New() (NewRegistry *IndexRegistry)

New creates indexRegistry instance

func (*IndexRegistry) GetIndexNames

func (I *IndexRegistry) GetIndexNames() (rv []string)

GetIndexNames gets the list of index names

func (*IndexRegistry) IndexByName

func (I *IndexRegistry) IndexByName(name string) bleve.Index

IndexByName gets index by name

func (*IndexRegistry) RegisterIndexName

func (I *IndexRegistry) RegisterIndexName(name string, idx bleve.Index)

RegisterIndexName adds new index to registry

func (*IndexRegistry) UnregisterIndexByName

func (I *IndexRegistry) UnregisterIndexByName(name string) bleve.Index

UnregisterIndexByName removes index from registry

func (*IndexRegistry) UpdateAlias

func (I *IndexRegistry) UpdateAlias(alias string, add, remove []string) error

UpdateAlias adds or removes indexAlias

type Registry

type Registry interface {
	RegisterIndexName(name string, idx bleve.Index)
	UnregisterIndexByName(name string) bleve.Index
	IndexByName(name string) bleve.Index
	GetIndexNames() []string
	UpdateAlias(alias string, add, remove []string) error
}

An Registry is to keep and maintaint indices available on runtime

Jump to

Keyboard shortcuts

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