storage

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidOption if not supported
	ErrInvalidOption = errors.New(`invalid option`)
)
View Source
var (
	ErrUndefinedDriver = errors.New(`[storage::registry] undefined driver`)
)

Error list...

Functions

func Close

func Close() error

Close listener

func Register

func Register(ctx context.Context, name string, options ...Option) error

Register connection

func RegisterConnector

func RegisterConnector(driver string, conn connector)

RegisterConnector function

func Storage

func Storage(name string) eventstream.Storager

Storage connection object

Types

type Config

type Config = eventstream.StorageConfig

Config of the storage

type Option added in v0.2.1

type Option func(cnf *Config)

Option of the connection

func WithBuffer added in v0.2.1

func WithBuffer(size uint) Option

WithBuffer size of the stream

func WithConfig added in v0.2.1

func WithConfig(conf *Config) Option

WithConfig custom

func WithConnect added in v0.2.1

func WithConnect(driver, connect string) Option

WithConnect to the database

func WithConnectURL added in v0.4.0

func WithConnectURL(connect string) Option

WithConnectURL to the database

func WithDebug added in v0.2.1

func WithDebug(debug bool) Option

WithDebug mode

func WithObjectConfig added in v0.2.1

func WithObjectConfig(obj any) Option

WithObjectConfig converts Object to JSON storage config

func WithRawConfig added in v0.2.1

func WithRawConfig(raw json.RawMessage) Option

WithRawConfig storage config

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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