memory

package
v0.4.6 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Memory

type Memory struct {
	sync.RWMutex

	DB *memdb.MemDB
}

Memory - Structure for in memory db

func New

func New(schema *memdb.DBSchema) (*Memory, error)

New - Creates new database schema in memory

func (*Memory) Close

func (m *Memory) Close() error

Close - Closing the in memory instance

func (*Memory) GetEngineType

func (m *Memory) GetEngineType() string

GetEngineType - Gets engine type, returns as string

func (*Memory) IsReady

func (m *Memory) IsReady(_ context.Context) (bool, error)

IsReady - Check if database is ready

type MockIMDatabase added in v0.3.8

type MockIMDatabase struct {
	mock.Mock
}

MockIMDatabase simulates the behavior of a real IMDatabase.

func (*MockIMDatabase) Close added in v0.3.8

func (m *MockIMDatabase) Close() error

func (*MockIMDatabase) GetEngineType added in v0.3.8

func (m *MockIMDatabase) GetEngineType() string

func (*MockIMDatabase) IsReady added in v0.3.8

func (m *MockIMDatabase) IsReady(ctx context.Context) (bool, error)

Jump to

Keyboard shortcuts

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