gotrade: Index | Files

package es

import ""

Package es implements an Elasticsearch batch handler. Currently this implementation assumes the index format of "logs-YY-MM-DD".


Package Files


type Config Uses

type Config struct {
    BufferSize int           // BufferSize is the number of logs to buffer before flush (default: 100)
    Client     Elasticsearch // Client for ES

Config for handler.

type Elasticsearch Uses

type Elasticsearch interface {
    Bulk(io.Reader) error

Elasticsearch interface.

type Handler Uses

type Handler struct {
    // contains filtered or unexported fields

Handler implementation.

func New Uses

func New(config *Config) *Handler

New handler with BufferSize

func (*Handler) HandleLog Uses

func (h *Handler) HandleLog(e *log.Entry) error

HandleLog implements log.Handler.

Package es imports 7 packages (graph) and is imported by 1 packages. Updated 2016-07-20. Refresh now. Tools for package owners.