data

package
v0.0.0-...-55c0a6c Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2021 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultDb = iota
	TypeDb
	MetaDb
	SearchDb
	SystemDb
	ShutdownCmd = iota
	ShutdownDone
	CreateRequest
	DeleteRequest
	ReadRequest
	ListRequest
	DescribeRequest
	UpdateRequest
	SearchRequest
	DELETED    = "deleted"
	INDEX_SIZE = 64
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DataStorage

type DataStorage struct {
	Running bool
	// contains filtered or unexported fields
}

Storage Type

func OpenStorage

func OpenStorage(cfg *InitialConfiguration) (*DataStorage, error)

func (*DataStorage) AddSearchKey

func (d *DataStorage) AddSearchKey(t interface{}, index []byte)

func (*DataStorage) Close

func (d *DataStorage) Close() error

func (*DataStorage) Connect

func (d *DataStorage) Connect() *StorageConnection

func (*DataStorage) Disconnect

func (d *DataStorage) Disconnect()

func (*DataStorage) Open

func (d *DataStorage) Open(index int) error

func (*DataStorage) Process

func (d *DataStorage) Process(requests <-chan StorageRequest, con *StorageConnection)

func (*DataStorage) Scope

func (d *DataStorage) Scope(scope string)

func (*DataStorage) Serve

func (d *DataStorage) Serve() error

func (*DataStorage) Switchb

func (d *DataStorage) Switchb(db int) error

type DescribeResponse

type DescribeResponse struct {
	RequestContent
	Found bool
	Count int64
	Meta  *ItemMetaInformation
}

type InitialConfiguration

type InitialConfiguration struct {
	DbPath         string
	PathAccessMode os.FileMode
	MaxDatabases   int
	AuthKey        string
	ConfigPath     string
}

* Ledis Configuration

type ItemMetaInformation

type ItemMetaInformation struct {
	Created time.Time
	Updated time.Time
	Type    []byte
}

Meta Information on Request Items

type ListResponse

type ListResponse struct {
	RequestContent
	Count    int64
	Type     []byte
	Elements [][]byte
	Content  []RequestContent
}

type ParameterType

type ParameterType struct {
	Offset int32
	Top    int32
	SKey   string
	SValue interface{}
}

Request Parametes

type RequestContent

type RequestContent interface {
}

Request Content

type StorageConnection

type StorageConnection struct {
	RequestChannel  chan StorageRequest
	ResponseChannel chan StorageResponse
	// contains filtered or unexported fields
}

Client Connection

func (*StorageConnection) Close

func (c *StorageConnection) Close()

type StorageRequest

type StorageRequest struct {
	Type      int
	Content   RequestContent
	Element   []byte
	Hash      []byte
	Parameter *ParameterType
}

* Request to Storage

func (*StorageRequest) Keys

func (t *StorageRequest) Keys() []string

type StorageResponse

type StorageResponse struct {
	Type     int
	Error    error
	Affected []byte
	Content  RequestContent
}

Response from Stroage Request

Jump to

Keyboard shortcuts

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