elastic

package
v0.0.0-...-086ef7a Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package elastic provides a way to send messages to an ElasticSearch instance. ES uses the following concepts: - index: the name of the index where ElasticSearch - DocType: the type of Doc in the index. (Will have to be dropped in ES7 - The ID of the message

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Feed

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

Feed is the client to send message to ElsasticSearch

func NewFeed

func NewFeed(elasticAddress string, srcName string) *Feed

NewFeed is the Factory -elasticAddress: the url of the instance of ElasticSearch -srcName: the name the program feeding ElasticSearch

func (*Feed) Send

func (r *Feed) Send(index string, docType string, msgType string, msgID string, msgBody interface{}) errstack.E

Send an upsert message to ElasticSearch - index: the name of the index in ElasticSearch - docType: the doc type in elastic search - msgType: the message type that defines the structure of the msgBody - msgID: an identifier of the message for ES. No ID, means a system insert. If an ID provided, an Upsert - msgBody: the msg payload Returns an error matching the outcome of the query

Jump to

Keyboard shortcuts

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