engine

package
v0.0.0-...-aaf2e34 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

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

func InitializeDatabase

func InitializeDatabase(partitionNumber uint8, filePath string) *Database

func (*Database) Clear

func (d *Database) Clear() uint

func (*Database) CountEntries

func (d *Database) CountEntries() uint

func (*Database) DetailsPartitions

func (d *Database) DetailsPartitions() []types.PartitionDetailsResponse

func (*Database) FlushPartitions

func (d *Database) FlushPartitions()

func (*Database) Keys

func (d *Database) Keys() []types.Key

func (*Database) Pop

func (d *Database) Pop(key string) (Item, error)

func (*Database) Push

func (d *Database) Push(key string, value []byte) (Item, error)

func (*Database) Read

func (d *Database) Read(key string) (*Item, error)

type Item

type Item struct {
	Key    string    `json:"key"`
	Value  []byte    `json:"value_b64"`
	Expire time.Time `json:"expire"`
}

type Partition

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

Jump to

Keyboard shortcuts

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