Documentation ¶
Overview ¶
GoBigdis is a persistent database that implements the Redis server protocol. Copyright (C) 2021 Riccardo Berto This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>. GoBigdis is a persistent database that implements the Redis server protocol. Copyright (C) 2021 Riccardo Berto This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>. GoBigdis is a persistent database that implements the Redis server protocol. Copyright (C) 2021 Riccardo Berto This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>. GoBigdis is a persistent database that implements the Redis server protocol. Copyright (C) 2021 Riccardo Berto This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct { FSRWL sync.RWMutex // RWMutex for filesystem access DataLock sync.Mutex // used only by writers to implement the copy-on-write pattern MaxDBNum int // the max number of the DBs to consider Root string // the parent folder of all the dbNum dirs Data atomic.Value // [dbNum][first][second][third]bool, this is the field that represents the source of truth for the cache // contains filtered or unexported fields }
func (*Cache) BuildCacheData ¶
func (c *Cache) BuildCacheData()
BuildCacheData builds a new Cache index from the filesystem
func (*Cache) Match ¶
Match returns true if the first config.CacheDepth bytes of key match any bytes of the respective levels of the Cache
type Key ¶
type Key struct { DB int HashedKey [32]byte // sha256 of the key // contains filtered or unexported fields }
func (*Key) Level3 ¶
Level3 is a convenience function that returns the first 3 hex-encoded bytes of HashedKey
func (*Key) ParentPath ¶
Click to show internal directories.
Click to hide internal directories.