gotrade: github.com/cyanly/gotrade/core/logger/handlers Index | Files

package es

import "github.com/cyanly/gotrade/core/logger/handlers"

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

Index

Package Files

handleES.go

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 {
    *Config
    // 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.