query

package
v0.0.0-...-24555ab Latest Latest
Warning

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

Go to latest
Published: May 5, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultHystrixTimeout    = 5000
	DefaultHystrixMaxRequest = 3
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ElasticClient

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

func CreateElasticSearchClient

func CreateElasticSearchClient(addrs []string) (*ElasticClient, error)

func (*ElasticClient) Close

func (es *ElasticClient) Close()

func (*ElasticClient) DeleteIndex

func (es *ElasticClient) DeleteIndex(indexName string) error

func (*ElasticClient) GetHitsForInListWithHystrix

func (es *ElasticClient) GetHitsForInListWithHystrix(startTime time.Time,
	indexName string, key string, whiteList ...interface{}) (chan *QueryHitResult, chan error)

func (*ElasticClient) GetHitsForItem

func (es *ElasticClient) GetHitsForItem(startTime time.Time, indexName string, key string, value string) (int64, error)

func (*ElasticClient) GetHitsForItemWithHystrix

func (es *ElasticClient) GetHitsForItemWithHystrix(startTime time.Time,
	indexName string, key string, value string) (chan *QueryHitResult, chan error)

func (*ElasticClient) GetHitsForNotInListWithHystrix

func (es *ElasticClient) GetHitsForNotInListWithHystrix(startTime time.Time,
	indexName string, key string, blackList ...interface{}) (chan *QueryHitResult, chan error)

func (*ElasticClient) GetHitsForQueryString

func (es *ElasticClient) GetHitsForQueryString(startTime time.Time, indexName string, msg string) (int64, error)

func (*ElasticClient) GetHitsForQueryStringWithHystrix

func (es *ElasticClient) GetHitsForQueryStringWithHystrix(startTime time.Time,
	indexName string, msg string) (chan *QueryHitResult, chan error)

func (*ElasticClient) GetIndex

func (es *ElasticClient) GetIndex() ([]string, error)

func (*ElasticClient) GetIndexByPrefix

func (es *ElasticClient) GetIndexByPrefix(name string) ([]string, error)

GetIndexByPrefix Get Index by prefix

type QueryHitResult

type QueryHitResult struct {
	Hits int64
	Took int64
}

Jump to

Keyboard shortcuts

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