database

package
v1.5.27 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GErrMessageIsExist    = errors.New("message is exist")
	GErrMessageIsNotExist = errors.New("message is not exist")
)

Functions

This section is empty.

Types

type IDBWrapper

type IDBWrapper interface {
	types.ICloser

	Get() IDatabase
	Set(IDatabase) IDBWrapper
}

func NewDBWrapper

func NewDBWrapper() IDBWrapper

type IDatabase

type IDatabase interface {
	types.ICloser

	Push(net_message.IMessage) error
	Load([]byte) (net_message.IMessage, error)
	Hash(uint64) ([]byte, error)
	Pointer() uint64

	Settings() ISettings
}

func NewDatabase

func NewDatabase(pSett ISettings) (IDatabase, error)

func NewInMemoryDatabase

func NewInMemoryDatabase(pSett ISettings) (IDatabase, error)

type ISettings

type ISettings interface {
	net_message.ISettings

	GetPath() string
	GetMessagesCapacity() uint64
}

func NewSettings

func NewSettings(pSett *SSettings) ISettings

type SSettings

type SSettings sSettings

Jump to

Keyboard shortcuts

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