testa

package module
v0.0.0-...-7ae4aea Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

README

Testa

Simple KV db store using sqlite, set to have multiple handles for read and a single for write along with WAL enabled

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ReadOnlyMaxConns int = 5000

Maximum number of read-only connections permitted by read-only handle

Functions

This section is empty.

Types

type Db

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

Database handles

func Open

func Open(path string) (*Db, error)

Open a database at the given path and recieve database handle (should use Close upon completion) Use as ReadWrite interface

func (*Db) Close

func (tdb *Db) Close()

Close the db

func (*Db) Get

func (tdb *Db) Get(key string) ([]byte, error)

Set the value of something

func (*Db) Set

func (tdb *Db) Set(key string, value []byte) error

Set the key of something

type Read

type Read interface {
	Get(key string) ([]byte, error)
}

Read-Only

type ReadWrite

type ReadWrite interface {
	Read
	Write
}

RW Interface

type Write

type Write interface {
	Set(key string, data []byte) error
}

Write-Only

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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