tool

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2025 License: BSD-3-Clause Imports: 45 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Comparer

type Comparer = base.Comparer

Comparer exports the base.Comparer type.

type DBExciseSpanFn

type DBExciseSpanFn func() (pebble.KeyRange, error)

DBExciseSpanFn is a function used to obtain the excise span for the `db excise` command. This allows a higher-level wrapper to add its own way of specifying the span. Returns an invalid KeyRange if none was specified (in which case the default --start/end flags are used).

type FilterPolicy

type FilterPolicy = base.FilterPolicy

FilterPolicy exports the base.FilterPolicy type.

type Merger

type Merger = base.Merger

Merger exports the base.Merger type.

type OpenOption

type OpenOption interface {
	Apply(dirname string, opts *pebble.Options)
}

OpenOption is an option that may be applied to the *pebble.Options before calling pebble.Open.

type Option

type Option func(*T)

A Option configures the Pebble introspection tool.

func Comparers

func Comparers(cmps ...*Comparer) Option

Comparers may be passed to New to register comparers for use by the introspesction tools.

func DefaultComparer

func DefaultComparer(c *Comparer) Option

DefaultComparer registers a comparer for use by the introspection tools and sets it as the default.

func FS

func FS(fs vfs.FS) Option

FS sets the filesystem implementation to use by the introspection tools.

func Filters

func Filters(filters ...FilterPolicy) Option

Filters may be passed to New to register filter policies for use by the introspection tools.

func KeySchema

func KeySchema(name string) Option

KeySchema configures the name of the schema to use when writing sstables.

func KeySchemas

func KeySchemas(schemas ...*colblk.KeySchema) Option

KeySchemas may be passed to New to register key schemas for use by the introspection tools.

func Mergers

func Mergers(mergers ...*Merger) Option

Mergers may be passed to New to register mergers for use by the introspection tools.

func OpenErrEnhancer

func OpenErrEnhancer(fn func(error) error) Option

OpenErrEnhancer sets a function that enhances an error encountered when the tool opens a database; used to provide the user additional context, for example that a corruption error might be caused by encryption at rest not being configured properly.

func OpenOptions

func OpenOptions(openOptions ...OpenOption) Option

OpenOptions may be passed to New to provide a set of OpenOptions that should be invoked to configure the *pebble.Options before opening a database.

func WithDBExciseSpanFn

func WithDBExciseSpanFn(fn DBExciseSpanFn) Option

WithDBExciseSpanFn specifies a function that returns the excise span for the `db excise` command.

type T

type T struct {
	Commands []*cobra.Command
	// contains filtered or unexported fields
}

T is the container for all of the introspection tools.

func New

func New(opts ...Option) *T

New creates a new introspection tool.

func (*T) ConfigureSharedStorage

func (t *T) ConfigureSharedStorage(
	s remote.StorageFactory,
	createOnShared remote.CreateOnSharedStrategy,
	createOnSharedLocator remote.Locator,
)

ConfigureSharedStorage updates the shared storage options.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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