dbstorage

package module
v0.99.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 12 Imported by: 3

README

Database Storage

Status
Stability alpha
Distributions contrib
Issues Open issues Closed issues
Code Owners @dmitryax, @atoulme

🚧 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() extension.Factory

NewFactory creates a factory for DBStorage extension.

Types

type Config

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

Config defines configuration for dbstorage extension.

func (*Config) Validate

func (cfg *Config) Validate() error

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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