monokage

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: MIT Imports: 5 Imported by: 0

README

monokage

In-Memory Database Using Bloom Filter

Installation

go get -u github.com/seipan/monokage

Usage

package main

import "github.com/seipan/monokage"

func main() {
	db := monokage.NewDB(100, 10)
	db.Insert([]byte("hello"))
	db.Insert([]byte("world"))

	ok := db.Check([]byte("hello"))
	if ok {
		println("hello is in the database")
	}else{
		println("hello is not in the database")
	}

}

License

Code licensed under the MIT License.

Author

seipan.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	// contains filtered or unexported fields
}

func NewDB

func NewDB(m uint, k uint) *DB

func (*DB) Check

func (db *DB) Check(key []byte) bool

func (*DB) Insert

func (db *DB) Insert(key []byte)

Jump to

Keyboard shortcuts

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