memory

package
v1.15.1 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2019 License: Apache-2.0 Imports: 14 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

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

Factory implements storage.Factory and creates storage components backed by memory store.

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) 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 Options

type Options struct {
	Configuration config.Configuration
}

Options stores the configuration entries for this storage

func (*Options) AddFlags

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

AddFlags from this storage to the CLI

func (*Options) InitFromViper

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

InitFromViper initializes the options struct with values from Viper

type Store

type Store struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Store is an in-memory store of traces

func NewStore

func NewStore() *Store

NewStore creates an unbounded in-memory store

func WithConfiguration

func WithConfiguration(configuration config.Configuration) *Store

WithConfiguration creates a new in memory storage based on the given configuration

func (*Store) FindTraceIDs

func (m *Store) FindTraceIDs(ctx context.Context, query *spanstore.TraceQueryParameters) ([]model.TraceID, error)

FindTraceIDs is not implemented.

func (*Store) FindTraces

func (m *Store) FindTraces(ctx context.Context, query *spanstore.TraceQueryParameters) ([]*model.Trace, error)

FindTraces returns all traces in the query parameters are satisfied by a trace's span

func (*Store) GetDependencies

func (m *Store) GetDependencies(endTs time.Time, lookback time.Duration) ([]model.DependencyLink, error)

GetDependencies returns dependencies between services

func (*Store) GetOperations

func (m *Store) GetOperations(ctx context.Context, service string) ([]string, error)

GetOperations returns the operations of a given service

func (*Store) GetServices

func (m *Store) GetServices(ctx context.Context) ([]string, error)

GetServices returns a list of all known services

func (*Store) GetTrace

func (m *Store) GetTrace(ctx context.Context, traceID model.TraceID) (*model.Trace, error)

GetTrace gets a trace

func (*Store) WriteSpan

func (m *Store) WriteSpan(span *model.Span) error

WriteSpan writes the given span

Jump to

Keyboard shortcuts

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