elasticsearch

package
v0.0.0-...-c2832fb Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2016 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const LogstashTemplate = `` /* 1133-byte string literal not displayed */
View Source
const Template = `` /* 1132-byte string literal not displayed */

Variables

View Source
var ErrFromElasticsearch = errors.New("elasticsearch reported an error")
View Source
var Templates = map[string]string{
	"cypress":  Template,
	"logstash": LogstashTemplate,
}

Functions

This section is empty.

Types

type Connection

type Connection interface {
	Do(*http.Request) (*http.Response, error)
}

type MockConnection

type MockConnection struct {
	mock.Mock
}

func (*MockConnection) Do

func (m *MockConnection) Do(_a0 *http.Request) (*http.Response, error)

type Plugin

type Plugin struct {
	Host     string `description:"host:port of elasticsearch node"`
	Index    string `description:"fixed index to use if set"`
	Prefix   string `description:"index prefix to use with dated indices (cypress)"`
	Logstash bool   `description:"use logstash format indices"`
}

func (*Plugin) Description

func (p *Plugin) Description() string

func (*Plugin) Receiver

func (p *Plugin) Receiver() (cypress.Receiver, error)

type Send

type Send struct {
	Host     string `short:"H" long:"host" default:"localhost:9200" description:"Address of elasticsearch"`
	Index    string `short:"i" long:"index" description:"Store all messages in one index rather than date driven indexes"`
	Prefix   string `short:"p" long:"prefix" default:"cypress" description:"Prefix to apply to date driven indexes"`
	Logstash bool   `short:"l" long:"logstash" description:"Store messages like logstash does"`
	// contains filtered or unexported fields
}

func (*Send) Close

func (s *Send) Close() error

func (*Send) Execute

func (s *Send) Execute(args []string) error

Called when used via the CLI

func (*Send) Init

func (s *Send) Init() error

Check all the options and get ready to run.

func (*Send) Receive

func (s *Send) Receive(m *cypress.Message) error

Write a Message to Elasticsearch

func (*Send) SetupTemplate

func (s *Send) SetupTemplate() error

Check and write an index template for the indexes used

Jump to

Keyboard shortcuts

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