elastic

package
v0.0.0-...-80e076f Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Proxy

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

Proxy elastic search proxy

func NewProxy

func NewProxy(config ProxyConfig) *Proxy

NewProxy initializes a new proxy

func (*Proxy) CreateIndex

func (p *Proxy) CreateIndex(indexName string, mapping string) error

CreateIndex creates an elastic search index

func (*Proxy) DeleteIndex

func (p *Proxy) DeleteIndex(indexName string) error

DeleteIndex deletes elastic search index

func (*Proxy) Index

func (p *Proxy) Index(indexName string, storesToIndex []models.StoreRecord) *models.IndexerResponse

Index indexes csv data

func (*Proxy) Search

func (p *Proxy) Search(request models.StoreQueryRequest, indexName string) (*models.StoreQueryResponse, error)

Search executes a store location elastic query and returns response

func (*Proxy) Stats

func (p *Proxy) Stats() (*elastic.ClusterStatsResponse, error)

Stats returns cluster stats

type ProxyConfig

type ProxyConfig struct {
	ElasticURL *url.URL
	Username   string
	Password   string
}

ProxyConfig represents EsProxy configuration

Jump to

Keyboard shortcuts

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