xrqlite

package
v0.0.0-...-c6a8645 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultConnURLKey = "DB_DSN"
	DefaultConnURL    = "http://localhost"
)

Variables

This section is empty.

Functions

func NewConnection

func NewConnection(connURL string) (*gorqlite.Connection, error)

func NewModule

func NewModule(name string) fx.Option

Module provides the RQLite dependencies to Uber FX

func RegisterLifecycle

func RegisterLifecycle(lc fx.Lifecycle, rqlc *Lifecycle)

Types

type Lifecycle

type Lifecycle struct {
	// contains filtered or unexported fields
}

func NewLifecycle

func NewLifecycle(conn *gorqlite.Connection) *Lifecycle

func (*Lifecycle) OnStart

func (s *Lifecycle) OnStart(ctx context.Context) error

OnStart pings the database

func (*Lifecycle) OnStop

func (s *Lifecycle) OnStop(ctx context.Context) error

OnStop gracefully shuts down the rqlite connection

Jump to

Keyboard shortcuts

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