index

package
v2.5.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2019 License: MIT Imports: 10 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Index

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

Index represents Index for Bleve.Index type

func NewSearchIndex

func NewSearchIndex(logger moira.Logger, database moira.Database) *Index

NewSearchIndex return new Index object

func (*Index) IsReady

func (index *Index) IsReady() bool

IsReady returns boolean value which determines if index is ready to use

func (*Index) SearchTriggers

func (index *Index) SearchTriggers(filterTags []string, searchString string, onlyErrors bool, page int64, size int64) (searchResults []*moira.SearchResult, total int64, err error)

SearchTriggers search for triggers in index and returns slice of trigger IDs

func (*Index) Start

func (index *Index) Start() error

Start initializes index. It creates new mapping and index all triggers from database

func (*Index) Stop

func (index *Index) Stop() error

Stop stops checks triggers

type TriggerIndex

type TriggerIndex interface {
	Search(filterTags []string, searchString string, onlyErrors bool, page int64, size int64) (searchResults []*moira.SearchResult, total int64, err error)
	Write(checks []*moira.TriggerCheck) error
	Delete(triggerIDs []string) error
	GetCount() (int64, error)
}

TriggerIndex is index for moira.TriggerChecks type

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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