memstore

package
v0.0.0-...-8e88d4a Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package memstore implements in-memory storage for atlas.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountStore

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

AccountStore stores accounts in-memory.

func NewAccountStore

func NewAccountStore() *AccountStore

NewPdataStore creates a new MemoryPdataStore.

func (*AccountStore) GetAccount

func (m *AccountStore) GetAccount(uid uint64) (*api0.Account, error)

func (*AccountStore) GetUIDsByUsername

func (m *AccountStore) GetUIDsByUsername(username string) ([]uint64, error)

func (*AccountStore) SaveAccount

func (m *AccountStore) SaveAccount(a *api0.Account) error

type PdataStore

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

PdataStore stores pdata in-memory, with optional compression.

func NewPdataStore

func NewPdataStore(compress bool) *PdataStore

NewPdataStore creates a new MemoryPdataStore.

func (*PdataStore) GetPdataCached

func (m *PdataStore) GetPdataCached(uid uint64, sha [sha256.Size]byte) ([]byte, bool, error)

func (*PdataStore) GetPdataHash

func (m *PdataStore) GetPdataHash(uid uint64) ([sha256.Size]byte, bool, error)

func (*PdataStore) SetPdata

func (m *PdataStore) SetPdata(uid uint64, buf []byte) (int, error)

Jump to

Keyboard shortcuts

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