Version: v0.0.0-...-45f56e5 Latest Latest

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

Go to latest
Published: Jun 4, 2021 License: Apache-2.0 Imports: 14 Imported by: 9




This section is empty.


This section is empty.


func BuildID

func BuildID(id string, key string) string

func BuildSearchRequest

func BuildSearchRequest(query interface{}, index string) (esapi.SearchRequest, error)

func SetDiscSpaceThresholds

func SetDiscSpaceThresholds(elasticURL string) error

func TurnOffIndexReadOnlyMode

func TurnOffIndexReadOnlyMode(index string, elasticURL string) error


type ElasticDriver

type ElasticDriver interface {
	SetProperty(name string, prop interface{}) error
	// AddMapping add a document mapping to be registered with ElasticSearch
	AddMapping(mapping Mapping) error
	//Initialize the driver, register mappings with elasticserach. Timeout in ms to wait for elastic to be available.
	Initialize(timeout time.Duration) error
	GetConnection() (datastore.Connection, error)

ElasticDriver describes an the Elastic Search driver

func New

func New(host string, port uint16, index string) ElasticDriver

New creates a new ElasticDriver

type Mapping

type Mapping struct {
	Entries map[string]interface{}

func NewMapping

func NewMapping(mapping string) (Mapping, error)

func (Mapping) MarshalJSON

func (m Mapping) MarshalJSON() ([]byte, error)

MarshalJSON returns *m as the JSON encoding of m.

func (*Mapping) UnmarshalJSON

func (m *Mapping) UnmarshalJSON(data []byte) error

UnmarshalJSON sets *m to a copy of data.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL