1 Star 0 Fork 0

gocoder / BoomFilter

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
mmap.go 1.02 KB
一键复制 编辑 原始数据 按行查看 历史
gocoder 提交于 2021-10-03 19:08 . feat(mmap): add mmap support
//Copyright (c) [Year] [name of copyright holder]
//[Software Name] is licensed under Mulan PSL v2.
//You can use this software according to the terms and conditions of the Mulan PSL v2.
//You may obtain a copy of Mulan PSL v2 at:
//http://license.coscl.org.cn/MulanPSL2
//THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
//See the Mulan PSL v2 for more details.
package MMap
import "gitee.com/goccoder/boom-filter/Algorithms"
type MMap interface {
// CreateIfNeed 创建映射文件
// 当已存在文件大小不一致,将重建新文件
CreateIfNeed(bytes int64, filename string) (int64, error)
// Create 创建映射文件
// -- 任意时刻将强制创建新文件
Create(bytes int64, filename string) (int64, error)
// Close 关闭映射文件
Close() error
// Set 设置指定偏移值
Set(offset uint64, f func(Algorithms.ValueType) Algorithms.ValueType) error
}
Go
1
https://gitee.com/goccoder/boom-filter.git
git@gitee.com:goccoder/boom-filter.git
goccoder
boom-filter
BoomFilter
01e772ac4519

搜索帮助