cassandra

package
v1.64.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: Apache-2.0 Imports: 30 Imported by: 33

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSession added in v1.64.0

func NewSession(c *config.Configuration) (cassandra.Session, error)

NewSession creates a new Cassandra session

Types

type Factory

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

Factory implements storage.Factory for Cassandra backend.

func NewFactory

func NewFactory() *Factory

NewFactory creates a new Factory.

func NewFactoryWithConfig added in v1.56.0

func NewFactoryWithConfig(
	opts Options,
	metricsFactory metrics.Factory,
	logger *zap.Logger,
) (*Factory, error)

NewFactoryWithConfig initializes factory with Config.

func (*Factory) AddFlags

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

AddFlags implements plugin.Configurable

func (*Factory) Close added in v1.19.0

func (f *Factory) Close() error

Close closes the resources held by the factory

func (*Factory) CreateArchiveSpanReader

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

CreateArchiveSpanReader implements storage.ArchiveFactory

func (*Factory) CreateArchiveSpanWriter

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

CreateArchiveSpanWriter implements storage.ArchiveFactory

func (*Factory) CreateDependencyReader

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

CreateDependencyReader implements storage.Factory

func (*Factory) CreateLock added in v1.27.0

func (f *Factory) CreateLock() (distributedlock.Lock, error)

CreateLock implements storage.SamplingStoreFactory

func (*Factory) CreateSamplingStore added in v1.27.0

func (f *Factory) CreateSamplingStore(int) (samplingstore.Store, error)

CreateSamplingStore implements storage.SamplingStoreFactory

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, _ *zap.Logger)

InitFromViper implements plugin.Configurable

func (*Factory) Initialize

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

Initialize implements storage.Factory

func (*Factory) Purge added in v1.58.0

func (f *Factory) Purge(_ context.Context) error

type IndexConfig added in v1.18.0

type IndexConfig struct {
	Logs         bool   `mapstructure:"logs"`
	Tags         bool   `mapstructure:"tags"`
	ProcessTags  bool   `mapstructure:"process_tags"`
	TagBlackList string `mapstructure:"tag_blacklist"`
	TagWhiteList string `mapstructure:"tag_whitelist"`
}

IndexConfig configures indexing. By default all indexing is enabled.

type NamespaceConfig added in v1.59.0

type NamespaceConfig struct {
	config.Configuration `mapstructure:",squash"`

	Enabled bool `mapstructure:"-"`
	// contains filtered or unexported fields
}

the Servers field in config.Configuration is a list, which we cannot represent with flags. This struct adds a plain string field that can be bound to flags and is then parsed when preparing the actual config.Configuration.

type Options

type Options struct {
	Primary NamespaceConfig `mapstructure:",squash"`

	SpanStoreWriteCacheTTL time.Duration `mapstructure:"span_store_write_cache_ttl"`
	Index                  IndexConfig   `mapstructure:"index"`
	// contains filtered or unexported fields
}

Options contains various type of Cassandra configs and provides the ability to bind them to command line flag and apply overlays, so that some configurations (e.g. archive) may be underspecified and infer the rest of its parameters from primary.

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

func (opt *Options) Get(namespace string) *config.Configuration

Get returns auxiliary named configuration.

func (*Options) GetPrimary

func (opt *Options) GetPrimary() config.Configuration

GetPrimary returns primary configuration.

func (*Options) InitFromViper

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

InitFromViper initializes Options with properties from viper

func (*Options) TagIndexBlacklist added in v1.16.0

func (opt *Options) TagIndexBlacklist() []string

TagIndexBlacklist returns the list of blacklisted tags

func (*Options) TagIndexWhitelist added in v1.16.0

func (opt *Options) TagIndexWhitelist() []string

TagIndexWhitelist returns the list of whitelisted tags

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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