pehrest

package
v0.0.0-...-4a740ba Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRecordNil = er.New().SetDetail(lang.LanguageEnglish, errorEnglishDomain, "Record Nil",
		"Given record can't be nil").Save()

	ErrRecordNotValid = er.New().SetDetail(lang.LanguageEnglish, errorEnglishDomain, "Record Not Valid",
		"Given recordID exist in storage devices but has diffrent StructureID").Save()

	ErrRecordNotExist = er.New().SetDetail(lang.LanguageEnglish, errorEnglishDomain, "Record Not Exist",
		"Given recordID not exist in any storage devices").Save()

	ErrRecordManipulated = er.New().SetDetail(lang.LanguageEnglish, errorEnglishDomain, "Record Manipulated",
		"Index record has problem when engine try to read it from storage devices").Save()
)

Errors

View Source
var HashDeleteKeyHistoryService = achaemenid.Service{
	ID:                2599603093,
	IssueDate:         1587282740,
	ExpiryDate:        0,
	ExpireInFavorOf:   "",
	ExpireInFavorOfID: 0,
	Status:            achaemenid.ServiceStatePreAlpha,

	Authorization: authorization.Service{
		CRUD:     authorization.CRUDDelete,
		UserType: authorization.UserTypeApp,
	},

	Name: map[lang.Language]string{
		lang.LanguageEnglish: "Index Hash - Delete Key History",
	},
	Description: map[lang.Language]string{
		lang.LanguageEnglish: "Delete all record associate to given index and delete index itself!",
	},
	TAGS: []string{
		"",
	},

	SRPCHandler: HashDeleteKeyHistorySRPC,
}

HashDeleteKeyHistoryService store details about HashDeleteKeyHistory service

View Source
var HashDeleteKeyService = achaemenid.Service{
	ID:                4172448155,
	IssueDate:         1587282740,
	ExpiryDate:        0,
	ExpireInFavorOf:   "",
	ExpireInFavorOfID: 0,
	Status:            achaemenid.ServiceStatePreAlpha,

	Authorization: authorization.Service{
		CRUD:     authorization.CRUDDelete,
		UserType: authorization.UserTypeApp,
	},

	Name: map[lang.Language]string{
		lang.LanguageEnglish: "Index Hash - Delete Key",
	},
	Description: map[lang.Language]string{
		lang.LanguageEnglish: `Delete just exiting index hash without any related record!
It wouldn't delete related records! Use DeleteIndexHistory() instead if you want delete all records too!`,
	},
	TAGS: []string{
		"",
	},

	SRPCHandler: HashDeleteKeySRPC,
}

HashDeleteKeyService store details about HashDeleteKey service

View Source
var HashDeleteValueService = achaemenid.Service{
	ID:                733788081,
	IssueDate:         1587282740,
	ExpiryDate:        0,
	ExpireInFavorOf:   "",
	ExpireInFavorOfID: 0,
	Status:            achaemenid.ServiceStatePreAlpha,

	Authorization: authorization.Service{
		CRUD:     authorization.CRUDDelete,
		UserType: authorization.UserTypeApp,
	},

	Name: map[lang.Language]string{
		lang.LanguageEnglish: "Index Hash - Delete Value",
	},
	Description: map[lang.Language]string{
		lang.LanguageEnglish: "Delete the value from exiting index hash key",
	},
	TAGS: []string{
		"",
	},

	SRPCHandler: HashDeleteValueSRPC,
}

HashDeleteValueService store details about HashDeleteValue service

View Source
var HashGetValuesNumberService = achaemenid.Service{
	ID:                2503912670,
	IssueDate:         1587282740,
	ExpiryDate:        0,
	ExpireInFavorOf:   "",
	ExpireInFavorOfID: 0,
	Status:            achaemenid.ServiceStatePreAlpha,

	Authorization: authorization.Service{
		CRUD:     authorization.CRUDRead,
		UserType: authorization.UserTypeApp,
	},

	Name: map[lang.Language]string{
		lang.LanguageEnglish: "Index Hash - Get Values Number",
	},
	Description: map[lang.Language]string{
		lang.LanguageEnglish: "Get number of recordsID register for specific index hash key",
	},
	TAGS: []string{
		"",
	},

	SRPCHandler: HashGetValuesNumberSRPC,
}

HashGetValuesNumberService store details about HashGetValuesNumber service

View Source
var HashGetValuesService = achaemenid.Service{
	ID:                183406116,
	IssueDate:         1587282740,
	ExpiryDate:        0,
	ExpireInFavorOf:   "",
	ExpireInFavorOfID: 0,
	Status:            achaemenid.ServiceStatePreAlpha,

	Authorization: authorization.Service{
		CRUD:     authorization.CRUDRead,
		UserType: authorization.UserTypeApp,
	},

	Name: map[lang.Language]string{
		lang.LanguageEnglish: "Index Hash - Get Values",
	},
	Description: map[lang.Language]string{
		lang.LanguageEnglish: `Get related RecordsID that set to given indexHash before.
Request 32 RecordsID to given IndexKey even if just one of them use!
Suggest not get more than 65536 related RecordID in single request!`,
	},
	TAGS: []string{
		"",
	},

	SRPCHandler: HashGetValuesSRPC,
}

HashGetValuesService store details about HashGetValues service

View Source
var HashListenToKeyService = achaemenid.Service{
	ID:                115550110,
	IssueDate:         1587282740,
	ExpiryDate:        0,
	ExpireInFavorOf:   "",
	ExpireInFavorOfID: 0,
	Status:            achaemenid.ServiceStatePreAlpha,

	Authorization: authorization.Service{
		CRUD:     authorization.CRUDRead,
		UserType: authorization.UserTypeApp,
	},

	Name: map[lang.Language]string{
		lang.LanguageEnglish: "Index Hash - Listen To Key",
	},
	Description: map[lang.Language]string{
		lang.LanguageEnglish: `get records to given index hash when new record set!
Request Must send to specific node that handle that hash index range!!
This service has a lot of use cases like:
- any geospatial usage e.g. tracking device or user, ...
- following content author like telegram channels or instagram live video!`,
	},
	TAGS: []string{
		"",
	},

	SRPCHandler: HashListenToKeySRPC,
}

HashListenToKeyService store details about HashListenToKey service

View Source
var HashSetValueService = achaemenid.Service{
	ID:                275144870,
	IssueDate:         1587282740,
	ExpiryDate:        0,
	ExpireInFavorOf:   "",
	ExpireInFavorOfID: 0,
	Status:            achaemenid.ServiceStatePreAlpha,

	Authorization: authorization.Service{
		CRUD:     authorization.CRUDUpdate,
		UserType: authorization.UserTypeApp,
	},

	Name: map[lang.Language]string{
		lang.LanguageEnglish: "Index Hash - Set Value",
	},
	Description: map[lang.Language]string{
		lang.LanguageEnglish: "set a record ID to new||exiting index hash.",
	},
	TAGS: []string{
		"",
	},

	SRPCHandler: HashSetValueSRPC,
}

HashSetValueService store details about HashSetValue service

View Source
var HashTransactionFinishService = achaemenid.Service{
	ID:                3635898242,
	IssueDate:         1587282740,
	ExpiryDate:        0,
	ExpireInFavorOf:   "",
	ExpireInFavorOfID: 0,
	Status:            achaemenid.ServiceStatePreAlpha,

	Authorization: authorization.Service{
		CRUD:     authorization.CRUDUpdate,
		UserType: authorization.UserTypeApp,
	},

	Name: map[lang.Language]string{
		lang.LanguageEnglish: "Index Hash - Transaction Finish",
	},
	Description: map[lang.Language]string{
		lang.LanguageEnglish: `use to approve transaction!
Transaction Manager will set record and index! no further action need after this call!`,
	},
	TAGS: []string{
		"",
	},

	SRPCHandler: HashTransactionFinishSRPC,
}

HashTransactionFinishService store details about HashTransactionFinish service

View Source
var HashTransactionGetValuesService = achaemenid.Service{
	ID:                2502111331,
	IssueDate:         1587282740,
	ExpiryDate:        0,
	ExpireInFavorOf:   "",
	ExpireInFavorOfID: 0,
	Status:            achaemenid.ServiceStatePreAlpha,

	Authorization: authorization.Service{
		CRUD:     authorization.CRUDRead,
		UserType: authorization.UserTypeApp,
	},

	Name: map[lang.Language]string{
		lang.LanguageEnglish: "Index Hash - Transaction Get Values",
	},
	Description: map[lang.Language]string{
		lang.LanguageEnglish: `Find records by indexes that store before in consistently!
It will get index from transaction managers not indexes nodes!`,
	},
	TAGS: []string{
		"",
	},

	SRPCHandler: HashTransactionGetValuesSRPC,
}

HashTransactionGetValuesService store details about HashTransactionGetValues service

View Source
var HashTransactionRegisterService = achaemenid.Service{
	ID:                811144689,
	IssueDate:         1587282740,
	ExpiryDate:        0,
	ExpireInFavorOf:   "",
	ExpireInFavorOfID: 0,
	Status:            achaemenid.ServiceStatePreAlpha,

	Authorization: authorization.Service{
		CRUD:     authorization.CRUDCreate,
		UserType: authorization.UserTypeApp,
	},

	Name: map[lang.Language]string{
		lang.LanguageEnglish: "Index Hash - Transaction Register",
	},
	Description: map[lang.Language]string{
		lang.LanguageEnglish: `Register new transaction on queue and get last record when transaction ready for this one!
Requester must send FinishTransaction() immediately, otherwise Transaction manager will drop this request from queue and chain!
transaction write can be on secondary indexes not primary indexes, due to primary index must always unique!
transaction manager on any node in a replication must sync with master replication corresponding node manager!
Get a record by ID when record ready to submit! Usually use in transaction queue to act when record ready to read!
Must send this request to specific node that handle that range!!`,
	},
	TAGS: []string{"transactional authority", "index lock ticket"},

	SRPCHandler: HashTransactionRegisterSRPC,
}

HashTransactionRegisterService store details about HashTransactionRegister service

Functions

func HashDeleteKey

func HashDeleteKey(req *HashDeleteKeyReq) (err *er.Error)

HashDeleteKey delete just exiting index hash without any related record.

func HashDeleteKeyHistory

func HashDeleteKeyHistory(req *HashDeleteKeyHistoryReq) (err *er.Error)

HashDeleteKeyHistory delete all records associate to given IndexKey and delete indexKey itself!

func HashDeleteKeyHistorySRPC

func HashDeleteKeyHistorySRPC(st *achaemenid.Stream)

HashDeleteKeyHistorySRPC is sRPC handler of HashDeleteKeyHistory service.

func HashDeleteKeySRPC

func HashDeleteKeySRPC(st *achaemenid.Stream)

HashDeleteKeySRPC is sRPC handler of HashDeleteKey service.

func HashDeleteValue

func HashDeleteValue(req *HashDeleteValueReq) (err *er.Error)

HashDeleteValue delete the value from exiting index key

func HashDeleteValueSRPC

func HashDeleteValueSRPC(st *achaemenid.Stream)

HashDeleteValueSRPC is sRPC handler of HashDeleteValue service.

func HashGetValuesNumberSRPC

func HashGetValuesNumberSRPC(st *achaemenid.Stream)

HashGetValuesNumberSRPC is sRPC handler of HashGetValuesNumber service.

func HashGetValuesSRPC

func HashGetValuesSRPC(st *achaemenid.Stream)

HashGetValuesSRPC is sRPC handler of HashGetValues service.

func HashListenToKeySRPC

func HashListenToKeySRPC(st *achaemenid.Stream)

HashListenToKeySRPC is sRPC handler of HashListenToKey service.

func HashSetValue

func HashSetValue(req *HashSetValueReq) (err *er.Error)

HashSetValue set a record ID to new||exiting index hash.

func HashSetValueSRPC

func HashSetValueSRPC(st *achaemenid.Stream)

HashSetValueSRPC is sRPC handler of HashSetValue service.

func HashTransactionFinish

func HashTransactionFinish(req *HashTransactionFinishReq) (err *er.Error)

HashTransactionFinish approve transaction!

func HashTransactionFinishSRPC

func HashTransactionFinishSRPC(st *achaemenid.Stream)

HashTransactionFinishSRPC is sRPC handler of HashTransactionFinish service.

func HashTransactionGetValuesSRPC

func HashTransactionGetValuesSRPC(st *achaemenid.Stream)

HashTransactionGetValuesSRPC is sRPC handler of HashTransactionGetValues service.

func HashTransactionRegisterSRPC

func HashTransactionRegisterSRPC(st *achaemenid.Stream)

HashTransactionRegisterSRPC is sRPC handler of HashTransactionRegister service.

Types

type HashDeleteKeyHistoryReq

type HashDeleteKeyHistoryReq struct {
	Type     gs.RequestType
	IndexKey [32]byte
}

HashDeleteKeyHistoryReq is request structure of HashDeleteKeyHistory()

func (*HashDeleteKeyHistoryReq) SyllabDecoder

func (req *HashDeleteKeyHistoryReq) SyllabDecoder(buf []byte)

SyllabDecoder decode from buf to req Due to this service just use internally, It skip check buf size syllab rule! Panic occur if bad request received!

func (*HashDeleteKeyHistoryReq) SyllabEncoder

func (req *HashDeleteKeyHistoryReq) SyllabEncoder() (buf []byte)

SyllabEncoder encode req to buf

type HashDeleteKeyReq

type HashDeleteKeyReq struct {
	Type     gs.RequestType
	IndexKey [32]byte
}

HashDeleteKeyReq is request structure of HashDeleteKey()

func (*HashDeleteKeyReq) SyllabDecoder

func (req *HashDeleteKeyReq) SyllabDecoder(buf []byte)

SyllabDecoder decode from buf to req Due to this service just use internally, It skip check buf size syllab rule! Panic occur if bad request received!

func (*HashDeleteKeyReq) SyllabEncoder

func (req *HashDeleteKeyReq) SyllabEncoder() (buf []byte)

SyllabEncoder encode req to buf

type HashDeleteValueReq

type HashDeleteValueReq struct {
	Type       gs.RequestType
	IndexKey   [32]byte
	IndexValue [32]byte
}

HashDeleteValueReq is request structure of HashDeleteValue()

func (*HashDeleteValueReq) SyllabDecoder

func (req *HashDeleteValueReq) SyllabDecoder(buf []byte)

SyllabDecoder decode from buf to req Due to this service just use internally, It skip check buf size syllab rule! Panic occur if bad request received!

func (*HashDeleteValueReq) SyllabEncoder

func (req *HashDeleteValueReq) SyllabEncoder() (buf []byte)

SyllabEncoder encode req to buf

type HashGetValuesNumberReq

type HashGetValuesNumberReq struct {
	IndexKey [32]byte
}

HashGetValuesNumberReq is request structure of HashGetValuesNumber()

func (*HashGetValuesNumberReq) SyllabDecoder

func (req *HashGetValuesNumberReq) SyllabDecoder(buf []byte)

SyllabDecoder decode from buf to req Due to this service just use internally, It skip check buf size syllab rule! Panic occur if bad request received!

func (*HashGetValuesNumberReq) SyllabEncoder

func (req *HashGetValuesNumberReq) SyllabEncoder() (buf []byte)

SyllabEncoder encode req to buf

type HashGetValuesNumberRes

type HashGetValuesNumberRes struct {
	IndexValuesNumber uint64
}

HashGetValuesNumberRes is response structure of HashGetValuesNumber()

func HashGetValuesNumber

func HashGetValuesNumber(req *HashGetValuesNumberReq) (res *HashGetValuesNumberRes, err *er.Error)

HashGetValuesNumber get number of IndexValues register for specific IndexKey

func (*HashGetValuesNumberRes) SyllabDecoder

func (res *HashGetValuesNumberRes) SyllabDecoder(buf []byte)

SyllabDecoder decode from buf to req Due to this service just use internally, It skip check buf size syllab rule! Panic occur if bad request received!

func (*HashGetValuesNumberRes) SyllabEncoder

func (res *HashGetValuesNumberRes) SyllabEncoder() (buf []byte)

SyllabEncoder encode req to buf

type HashGetValuesReq

type HashGetValuesReq struct {
	IndexKey [32]byte
	Offset   uint64
	Limit    uint64 // It is better to be modulus of 32||128 if storage devices use 4K clusters!
}

HashGetValuesReq is request structure of HashGetValues()

func (*HashGetValuesReq) SyllabDecoder

func (req *HashGetValuesReq) SyllabDecoder(buf []byte)

SyllabDecoder decode from buf to req Due to this service just use internally, It skip check buf size syllab rule! Panic occur if bad request received!

func (*HashGetValuesReq) SyllabEncoder

func (req *HashGetValuesReq) SyllabEncoder() (buf []byte)

SyllabEncoder encode req to buf

type HashGetValuesRes

type HashGetValuesRes struct {
	IndexValues [][32]byte
}

HashGetValuesRes is response structure of HashGetValues()

func HashGetValues

func HashGetValues(req *HashGetValuesReq) (res *HashGetValuesRes, err *er.Error)

HashGetValues returns related IndexValues that set to given indexKey before in local storages.

func (*HashGetValuesRes) SyllabDecoder

func (res *HashGetValuesRes) SyllabDecoder(buf []byte)

SyllabDecoder decode from buf to req Due to this service just use internally, It skip check buf size syllab rule! Panic occur if bad request received!

func (*HashGetValuesRes) SyllabEncoder

func (res *HashGetValuesRes) SyllabEncoder() (buf []byte)

SyllabEncoder encode res to buf

type HashListenToKeyReq

type HashListenToKeyReq struct {
	IndexKey       [32]byte
	ReceiveChannel chan []byte `syllab:"-"`
}

HashListenToKeyReq is request structure of HashListenToKey()

func (*HashListenToKeyReq) SyllabDecoder

func (req *HashListenToKeyReq) SyllabDecoder(buf []byte)

SyllabDecoder decode from buf to req Due to this service just use internally, It skip check buf size syllab rule! Panic occur if bad request received!

func (*HashListenToKeyReq) SyllabEncoder

func (req *HashListenToKeyReq) SyllabEncoder() (buf []byte)

SyllabEncoder encode req to buf

type HashListenToKeyRes

type HashListenToKeyRes struct {
	Record []byte
}

HashListenToKeyRes is response structure of HashListenToKey()

func HashListenToKey

func HashListenToKey(req *HashListenToKeyReq) (res *HashListenToKeyRes, err *er.Error)

HashListenToKey get the recordID by index hash when new record set!

func (*HashListenToKeyRes) SyllabDecoder

func (res *HashListenToKeyRes) SyllabDecoder(buf []byte)

SyllabDecoder decode from buf to res Due to this service just use internally, It skip check buf size syllab rule! Panic occur if bad request received!

func (*HashListenToKeyRes) SyllabEncoder

func (res *HashListenToKeyRes) SyllabEncoder() (buf []byte)

SyllabEncoder encode req to buf

type HashSetValueReq

type HashSetValueReq struct {
	Type       gs.RequestType
	IndexKey   [32]byte
	IndexValue [32]byte // can be RecordID or any data up to 32 byte length
}

HashSetValueReq is request structure of HashSetValue()

func (*HashSetValueReq) SyllabDecoder

func (req *HashSetValueReq) SyllabDecoder(buf []byte)

SyllabDecoder decode from buf to req Due to this service just use internally, It skip check buf size syllab rule! Panic occur if bad request received!

func (*HashSetValueReq) SyllabEncoder

func (req *HashSetValueReq) SyllabEncoder() (buf []byte)

SyllabEncoder encode req to buf

type HashTransactionFinishReq

type HashTransactionFinishReq struct {
	Type     gs.RequestType
	IndexKey [32]byte
	Record   []byte
}

HashTransactionFinishReq is request structure of HashTransactionFinish()

func (*HashTransactionFinishReq) SyllabDecoder

func (req *HashTransactionFinishReq) SyllabDecoder(buf []byte)

SyllabDecoder decode from buf to req Due to this service just use internally, It skip check buf size syllab rule! Panic occur if bad request received!

func (*HashTransactionFinishReq) SyllabEncoder

func (req *HashTransactionFinishReq) SyllabEncoder() (buf []byte)

SyllabEncoder encode req to buf

type HashTransactionGetValuesReq

type HashTransactionGetValuesReq struct {
	IndexKey [32]byte
}

HashTransactionGetValuesReq is request structure of HashTransactionGetValues()

func (*HashTransactionGetValuesReq) SyllabDecoder

func (req *HashTransactionGetValuesReq) SyllabDecoder(buf []byte)

SyllabDecoder decode from buf to req Due to this service just use internally, It skip check buf size syllab rule! Panic occur if bad request received!

func (*HashTransactionGetValuesReq) SyllabEncoder

func (req *HashTransactionGetValuesReq) SyllabEncoder() (buf []byte)

SyllabEncoder encode req to buf

type HashTransactionGetValuesRes

type HashTransactionGetValuesRes struct {
	IndexValues [][32]byte // Max 128 record return
}

HashTransactionGetValuesRes is response structure of HashTransactionGetValues()

func HashTransactionGetValues

func HashTransactionGetValues(req *HashTransactionGetValuesReq) (res *HashTransactionGetValuesRes, err *er.Error)

HashTransactionGetValues find records by indexes that store before in consistently!

func (*HashTransactionGetValuesRes) SyllabDecoder

func (res *HashTransactionGetValuesRes) SyllabDecoder(buf []byte)

SyllabDecoder decode from buf to req Due to this service just use internally, It skip check buf size syllab rule! Panic occur if bad request received!

func (*HashTransactionGetValuesRes) SyllabEncoder

func (res *HashTransactionGetValuesRes) SyllabEncoder() (buf []byte)

SyllabEncoder encode req to buf

type HashTransactionRegisterReq

type HashTransactionRegisterReq struct {
	Type     gs.RequestType
	IndexKey [32]byte
	RecordID [32]byte
}

HashTransactionRegisterReq is request structure of HashTransactionRegister()

func (*HashTransactionRegisterReq) SyllabDecoder

func (req *HashTransactionRegisterReq) SyllabDecoder(buf []byte)

SyllabDecoder decode from buf to req Due to this service just use internally, It skip check buf size syllab rule! Panic occur if bad request received!

func (*HashTransactionRegisterReq) SyllabEncoder

func (req *HashTransactionRegisterReq) SyllabEncoder() (buf []byte)

SyllabEncoder encode req to buf

type HashTransactionRegisterRes

type HashTransactionRegisterRes struct {
	Record []byte
}

HashTransactionRegisterRes is response structure of HashTransactionRegister()

func HashTransactionRegister

func HashTransactionRegister(req *HashTransactionRegisterReq) (res *HashTransactionRegisterRes, err *er.Error)

HashTransactionRegister register new transaction on queue and get last record when transaction ready for this one!

func (*HashTransactionRegisterRes) SyllabDecoder

func (res *HashTransactionRegisterRes) SyllabDecoder(buf []byte)

SyllabDecoder decode from buf to req Due to this service just use internally, It skip check buf size syllab rule! Panic occur if bad request received!

func (*HashTransactionRegisterRes) SyllabEncoder

func (res *HashTransactionRegisterRes) SyllabEncoder() (buf []byte)

SyllabEncoder encode req to buf

type IndexHash

type IndexHash struct {
	/* Common header data */
	RecordID          [32]byte
	RecordStructureID uint64
	RecordSize        uint64
	WriteTime         etime.Time
	OwnerAppID        [32]byte

	/* Unique data */
	EarlierExpandTime   etime.Time
	LastExpandTime      etime.Time
	IndexValuesNumber   uint64     // IndexValues len
	IndexValuesCapacity uint64     // IndexValues cap.
	IndexValues         [][32]byte // Can store RecordsID or any data up to 32 byte length and store by time of added to index
}

IndexHash is standard structure to store any hash byte index!! It is simple secondary index e.g. hash(RecordStructureID, "user@email.com")

func (*IndexHash) Append

func (ih *IndexHash) Append(recordID ...[32]byte) (err *er.Error)

Append add given RecordID with any logic need like expand!

func (*IndexHash) Delete

func (ih *IndexHash) Delete(recordID [32]byte) (err *er.Error)

Delete use to delete given record ID form given indexHash!

func (*IndexHash) DeleteRecord

func (ih *IndexHash) DeleteRecord() (err *er.Error)

DeleteRecord use to delete given record ID form given indexHash!

func (*IndexHash) Deletes

func (ih *IndexHash) Deletes(indexValues [][32]byte) (err *er.Error)

Deletes use to delete given records ID form given indexHash!

func (*IndexHash) Get

func (ih *IndexHash) Get(offset, limit uint64) (indexValues [][32]byte, err *er.Error)

Get return related records ID to given index with offset and limit!

func (*IndexHash) Peek

func (ih *IndexHash) Peek() (recordID [32]byte, err *er.Error)

Peek return last recordID pushed to given index. unlike Pop() it won't delete it from index!

func (*IndexHash) Pop

func (ih *IndexHash) Pop() (recordID [32]byte, err *er.Error)

Pop return last RecordID in given index and delete it from index!

func (*IndexHash) Push

func (ih *IndexHash) Push(recordID [32]byte) (err *er.Error)

Push add given RecordID to then end of given hash index!

func (*IndexHash) ReadHeader

func (ih *IndexHash) ReadHeader() (err *er.Error)

ReadHeader get needed data from storage and decode to given ih without IndexValues array data

Jump to

Keyboard shortcuts

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