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 ¶
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