dbstorage

package
v0.54.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2022 License: Apache-2.0 Imports: 11 Imported by: 3

README

Database Storage

🚧 This extension is in alpha. Configuration and functionality are subject to change.

The Database Storage extension can persist state to a relational database.

The extension requires read and write access to a database table.

driver: the name of the database driver to use. By default, the storage client supports "sqlite3" and "pgx".

Implementors can add additional driver support by importing SQL drivers into the program. See Golang database/sql package documentation for more information.

datasource: the url of the database, in the format accepted by the driver.

extensions:
  db_storage:
    driver: "sqlite3"
    datasource: "foo.db?_busy_timeout=10000&_journal=WAL&_sync=NORMAL"

service:
  extensions: [db_storage]
  pipelines:
    traces:
      receivers: [nop]
      processors: [nop]
      exporters: [nop]

# Data pipeline is required to load the config.
receivers:
  nop:
processors:
  nop:
exporters:
  nop:

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() component.ExtensionFactory

NewFactory creates a factory for DBStorage extension.

Types

type Config

type Config struct {
	config.ExtensionSettings `mapstructure:",squash"`
	DriverName               string `mapstructure:"driver,omitempty"`
	DataSource               string `mapstructure:"datasource,omitempty"`
}

Config defines configuration for dbstorage extension.

func (*Config) Validate

func (cfg *Config) Validate() error

Jump to

Keyboard shortcuts

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