persistence

package
v0.5.14 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CmdSet uint8 = 1 << iota
	CmdSetX
	CmdUpdate
	CmdDel
	CmdDels
	CmdRename
	CmdCover
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CmdOpt added in v0.2.0

type CmdOpt[T template.Object] [256]T

CmdOpt save options with cmd

func NewCmd added in v0.2.0

func NewCmd[T template.Object]() *CmdOpt[T]

NewCmd with empty array

func (*CmdOpt[T]) Get added in v0.2.0

func (m *CmdOpt[T]) Get(cmd uint8) T

Get options with cmd

func (*CmdOpt[T]) Set added in v0.2.0

func (m *CmdOpt[T]) Set(cmd uint8, opt T)

Set options with cmd

type Config added in v0.1.3

type Config struct {
	QdbPath  string `json:"qdb_path,omitempty"`
	QdbTimer int    `json:"qdb_timer,omitempty"`
}

Config is persistence manager config file

type Manager

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

Manager persistence

func NewWithConfig added in v0.1.5

func NewWithConfig(c Config) (*Manager, *qerror.Error)

NewWithConfig to Manager

func (*Manager) Close added in v0.1.3

func (m *Manager) Close()

Close persistence Manager

func (*Manager) Fetch added in v0.1.6

func (m *Manager) Fetch(f func(uint8, [][]byte) *qerror.Error) *qerror.Error

Fetch local in table

func (*Manager) Run added in v0.1.6

func (m *Manager) Run()

Run aof gorountie

func (*Manager) Save added in v0.1.5

func (m *Manager) Save(cmd uint8, args []any)

Save logs in local

Jump to

Keyboard shortcuts

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