metrics

package
v0.0.0-...-d00bc91 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2015 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package metrics provides a bleve.store.KVStore implementation that wraps another, real KVStore implementation, and uses go-metrics to track runtime performance metrics.

Index

Constants

View Source
const MaxErrors = 100
View Source
const Name = "metrics"

Variables

This section is empty.

Functions

func StoreConstructor

func StoreConstructor(config map[string]interface{}) (store.KVStore, error)

func WriteTimerCSV

func WriteTimerCSV(w io.Writer, timer metrics.Timer)

func WriteTimerCSVHeader

func WriteTimerCSVHeader(w io.Writer, prefix string)

func WriteTimerJSON

func WriteTimerJSON(w io.Writer, timer metrics.Timer)

Types

type Batch

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

func (*Batch) Close

func (w *Batch) Close() error

func (*Batch) Delete

func (w *Batch) Delete(key []byte)

func (*Batch) Execute

func (w *Batch) Execute() (err error)

func (*Batch) Merge

func (w *Batch) Merge(key, val []byte)

func (*Batch) Set

func (w *Batch) Set(key, val []byte)

type Iterator

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

func (*Iterator) Close

func (w *Iterator) Close() error

func (*Iterator) Current

func (w *Iterator) Current() ([]byte, []byte, bool)

func (*Iterator) Key

func (w *Iterator) Key() []byte

func (*Iterator) Next

func (w *Iterator) Next()

func (*Iterator) Seek

func (w *Iterator) Seek(x []byte)

func (*Iterator) SeekFirst

func (w *Iterator) SeekFirst()

func (*Iterator) Valid

func (w *Iterator) Valid() bool

func (*Iterator) Value

func (w *Iterator) Value() []byte

type Reader

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

func (*Reader) BytesSafeAfterClose

func (w *Reader) BytesSafeAfterClose() bool

func (*Reader) Close

func (w *Reader) Close() error

func (*Reader) Get

func (w *Reader) Get(key []byte) (v []byte, err error)

func (*Reader) Iterator

func (w *Reader) Iterator(key []byte) (i store.KVIterator)

type Store

type Store struct {
	TimerReaderGet         metrics.Timer
	TimerReaderIterator    metrics.Timer
	TimerWriterGet         metrics.Timer
	TimerWriterIterator    metrics.Timer
	TimerWriterSet         metrics.Timer
	TimerWriterDelete      metrics.Timer
	TimerIteratorSeekFirst metrics.Timer
	TimerIteratorSeek      metrics.Timer
	TimerIteratorNext      metrics.Timer
	TimerBatchMerge        metrics.Timer
	TimerBatchExecute      metrics.Timer
	// contains filtered or unexported fields
}

func NewBleveMetricsStore

func NewBleveMetricsStore(o store.KVStore) *Store

func (*Store) Actual

func (s *Store) Actual() store.KVStore

func (*Store) AddError

func (s *Store) AddError(op string, err error, key []byte)

func (*Store) Close

func (s *Store) Close() error

func (*Store) Open

func (s *Store) Open() error

func (*Store) Reader

func (s *Store) Reader() (store.KVReader, error)

func (*Store) SetMergeOperator

func (s *Store) SetMergeOperator(mo store.MergeOperator)

func (*Store) WriteCSV

func (s *Store) WriteCSV(w io.Writer)

func (*Store) WriteCSVHeader

func (s *Store) WriteCSVHeader(w io.Writer)

func (*Store) WriteJSON

func (s *Store) WriteJSON(w io.Writer)

func (*Store) Writer

func (s *Store) Writer() (store.KVWriter, error)

type StoreError

type StoreError struct {
	Time string
	Op   string
	Err  string
	Key  string
}

type Writer

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

func (*Writer) BytesSafeAfterClose

func (w *Writer) BytesSafeAfterClose() bool

func (*Writer) Close

func (w *Writer) Close() error

func (*Writer) Delete

func (w *Writer) Delete(key []byte) (err error)

func (*Writer) Get

func (w *Writer) Get(key []byte) (v []byte, err error)

func (*Writer) Iterator

func (w *Writer) Iterator(key []byte) (i store.KVIterator)

func (*Writer) NewBatch

func (w *Writer) NewBatch() store.KVBatch

func (*Writer) Set

func (w *Writer) Set(key, val []byte) (err error)

Jump to

Keyboard shortcuts

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