lslib

package
v0.0.0-...-a056490 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: Apache-2.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

View Source
const (
	EnvLitestreamUrl             = "LITESTREAM_URL"
	EnvLitestreamAccessKeyID     = "LITESTREAM_ACCESS_KEY_ID"
	EnvLitestreamSecretAccessKey = "LITESTREAM_SECRET_ACCESS_KEY"
)

Variables

This section is empty.

Functions

func ParseReplicaURL

func ParseReplicaURL(s string) (scheme, host, urlpath string, err error)

Types

type Config

type Config struct {
	Dsn string

	LitestreamUrl string

	DriverName string
}

func NewConfig

func NewConfig(dsn string) *Config

func (*Config) WithDriverName

func (c *Config) WithDriverName(driverName string) *Config

func (*Config) WithLsUrl

func (c *Config) WithLsUrl(lsUrl string) *Config

type DB

type DB interface {
	Open(ctx context.Context) (db *sql.DB, err error)
	Close(ctx context.Context)
}

func NewDB

func NewDB(conf *Config) DB

Jump to

Keyboard shortcuts

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