tracekv

package
v0.0.0-...-f17c261 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2015 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package tracekv implements a tracing wrapper for kv.DB

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithSimpleTracing

func WithSimpleTracing(db kv.DB, traceUpdate func(Update)) kv.DB

WithSimpleTracing returns a kv.DB that calls traceUpdate on every Put (regardless of whether it is issued by itself or during a Batch Write).

func WithTracing

func WithTracing(db kv.DB, traceUpdate func(Update), traceBatch func([]Update)) kv.DB

WithTracing returns a kv.DB that calls traceUpdate on every Put or Delete and traceBatch on every Write.

Types

type Update

type Update struct {
	Key, Value []byte
	IsDeletion bool
}

Update represents a single change to a kv.DB.

Jump to

Keyboard shortcuts

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