Back to godoc.org

Package badger

v1.15.1
Latest Go to latest

The highest tagged major version is .

Published: Nov 7, 2019 | License: Apache-2.0 | Module: github.com/Hoggles/TraceAI

Index

type Factory

type Factory struct {
	Options *Options
	// contains filtered or unexported fields
}

Factory implements storage.Factory for Badger backend.

func NewFactory

func NewFactory() *Factory

NewFactory creates a new Factory.

func (*Factory) AddFlags

func (f *Factory) AddFlags(flagSet *flag.FlagSet)

AddFlags implements plugin.Configurable

func (*Factory) Close

func (f *Factory) Close() error

Close Implements io.Closer and closes the underlying storage

func (*Factory) CreateDependencyReader

func (f *Factory) CreateDependencyReader() (dependencystore.Reader, error)

CreateDependencyReader implements storage.Factory

func (*Factory) CreateSpanReader

func (f *Factory) CreateSpanReader() (spanstore.Reader, error)

CreateSpanReader implements storage.Factory

func (*Factory) CreateSpanWriter

func (f *Factory) CreateSpanWriter() (spanstore.Writer, error)

CreateSpanWriter implements storage.Factory

func (*Factory) InitFromViper

func (f *Factory) InitFromViper(v *viper.Viper)

InitFromViper implements plugin.Configurable

func (*Factory) Initialize

func (f *Factory) Initialize(metricsFactory metrics.Factory, logger *zap.Logger) error

Initialize implements storage.Factory

type NamespaceConfig

type NamespaceConfig struct {
	SpanStoreTTL          time.Duration
	ValueDirectory        string
	KeyDirectory          string
	Ephemeral             bool // Setting this to true will ignore ValueDirectory and KeyDirectory
	SyncWrites            bool
	MaintenanceInterval   time.Duration
	MetricsUpdateInterval time.Duration
	Truncate              bool
	ReadOnly              bool
	// contains filtered or unexported fields
}

NamespaceConfig is badger's internal configuration data

type Options

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

Options store storage plugin related configs

func NewOptions

func NewOptions(primaryNamespace string, otherNamespaces ...string) *Options

NewOptions creates a new Options struct.

func (*Options) AddFlags

func (opt *Options) AddFlags(flagSet *flag.FlagSet)

AddFlags adds flags for Options

func (*Options) GetPrimary

func (opt *Options) GetPrimary() *NamespaceConfig

GetPrimary returns the primary namespace configuration

func (*Options) InitFromViper

func (opt *Options) InitFromViper(v *viper.Viper)

InitFromViper initializes Options with properties from viper

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier