ondisk

package
v0.0.0-...-55ee3f7 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Dir where data will be located.
	Dir string `json:"dir" yaml:"dir"`

	NoSync bool

	// BytesPerSync is from [pebble.Options].
	BytesPerSync int

	// DisableWAL is from [pebble.Options].
	DisableWAL bool

	// ErrorIfExists is from [pebble.Options].
	ErrorIfExists bool

	// ErrorIfNotExists is from [pebble.Options].
	ErrorIfNotExists bool

	// MaxOpenFiles is from [pebble.Options].
	MaxOpenFiles int

	// MemTableSize is from [pebble.Options].
	MemTableSize uint64

	// ReadOnly is from [pebble.Options].
	ReadOnly bool

	// WALDir is from [pebble.Options].
	WALDir string
}

type Store

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

func Open

func Open(cfg Config) (*Store, error)

func (*Store) APPEND

func (s *Store) APPEND(key, value []byte) (int, error)

func (*Store) DECR

func (s *Store) DECR(key []byte) (int64, error)

func (*Store) DECRBY

func (s *Store) DECRBY(key []byte, by int) (int64, error)

func (*Store) GET

func (s *Store) GET(key []byte) ([]byte, error)

func (*Store) GETDEL

func (s *Store) GETDEL(key []byte) ([]byte, error)

func (*Store) GETRANGE

func (s *Store) GETRANGE(key []byte, start, end int) ([]byte, error)

func (*Store) GETSET

func (s *Store) GETSET(key, value []byte) ([]byte, error)

func (*Store) INCR

func (s *Store) INCR(key []byte) (int64, error)

func (*Store) INCRBY

func (s *Store) INCRBY(key []byte, by int) (int64, error)

func (*Store) INCRBYFLOAT

func (s *Store) INCRBYFLOAT(key []byte, by float64) (string, error)

func (*Store) MGET

func (s *Store) MGET(keys ...[]byte) ([][]byte, error)

func (*Store) MSET

func (s *Store) MSET(keyvals ...[]byte) error

func (*Store) SET

func (s *Store) SET(key, value []byte) error

func (*Store) STRLEN

func (s *Store) STRLEN(key []byte) (int64, error)

Jump to

Keyboard shortcuts

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