store

package
v0.0.0-...-a57c32f Latest Latest
Warning

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

Go to latest
Published: May 17, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collection

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

func (*Collection) Close

func (col *Collection) Close()

func (*Collection) Delete

func (col *Collection) Delete(key string) []byte

func (*Collection) Get

func (col *Collection) Get(key string) []byte

func (*Collection) GetAll

func (col *Collection) GetAll() []byte

func (*Collection) GetDataFilePath

func (col *Collection) GetDataFilePath(name string) string

func (*Collection) InitializeCollection

func (col *Collection) InitializeCollection()

func (*Collection) LastPositionFromFile

func (col *Collection) LastPositionFromFile()

func (*Collection) LastPositionToFile

func (col *Collection) LastPositionToFile()

func (*Collection) Put

func (col *Collection) Put(value []byte) []byte

func (*Collection) ReadIndexFromFile

func (col *Collection) ReadIndexFromFile() int

func (*Collection) SyncIndexToFile

func (col *Collection) SyncIndexToFile()

type KVServer

type KVServer struct {
	Storages map[string]*Storage
	// contains filtered or unexported fields
}

func CreateKVServer

func CreateKVServer() *KVServer

func (*KVServer) Close

func (kvServer *KVServer) Close()

func (*KVServer) CreateKeyValueStore

func (kvServer *KVServer) CreateKeyValueStore(Name string) *Storage

func (*KVServer) GetStorage

func (kvServer *KVServer) GetStorage(name string) *Storage

func (*KVServer) GetStorageNames

func (kvServer *KVServer) GetStorageNames() []string

func (*KVServer) GetStorages

func (kvServer *KVServer) GetStorages() []*Storage

func (*KVServer) ReadStoragesFromFile

func (kvServer *KVServer) ReadStoragesFromFile()

func (*KVServer) SyncStoragesToFile

func (kvServer *KVServer) SyncStoragesToFile()

type Storage

type Storage struct {
	Name string
	// contains filtered or unexported fields
}

func (*Storage) Close

func (s *Storage) Close()

func (*Storage) CreateCollection

func (s *Storage) CreateCollection(name string) *Collection

func (*Storage) GetCollection

func (s *Storage) GetCollection(name string) *Collection

func (*Storage) GetCollections

func (s *Storage) GetCollections() []string

func (*Storage) ReadCollectionsFromFile

func (s *Storage) ReadCollectionsFromFile()

func (*Storage) SyncCollectionsToFile

func (s *Storage) SyncCollectionsToFile()

Directories

Path Synopsis
http

Jump to

Keyboard shortcuts

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