tracekv

package
v0.0.0-...-98bfee9 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2016 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