Documentation ¶
Index ¶
- Constants
- type DataStorage
- func (d *DataStorage) AddSearchKey(t interface{}, index []byte)
- func (d *DataStorage) Close() error
- func (d *DataStorage) Connect() *StorageConnection
- func (d *DataStorage) Disconnect()
- func (d *DataStorage) Open(index int) error
- func (d *DataStorage) Process(requests <-chan StorageRequest, con *StorageConnection)
- func (d *DataStorage) Scope(scope string)
- func (d *DataStorage) Serve() error
- func (d *DataStorage) Switchb(db int) error
- type DescribeResponse
- type InitialConfiguration
- type ItemMetaInformation
- type ListResponse
- type ParameterType
- type RequestContent
- type StorageConnection
- type StorageRequest
- type StorageResponse
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 ¶
Meta Information on Request Items
type ListResponse ¶
type ListResponse struct { RequestContent Count int64 Type []byte Elements [][]byte Content []RequestContent }
type ParameterType ¶
Request Parametes
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
Click to show internal directories.
Click to hide internal directories.