refSys

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ReferSys

type ReferSys struct {
	DB *uleveldb.ULevelDB
	// contains filtered or unexported fields
}

ReferSys Reference count system

func NewReferSys

func NewReferSys(db *uleveldb.ULevelDB) (*ReferSys, error)

NewReferSys new a reference sys

func (*ReferSys) AddReference

func (i *ReferSys) AddReference(cid string) error

AddReference add refer for block

func (*ReferSys) HasReference

func (i *ReferSys) HasReference(cid string) bool

HasReference check if cid has reference

func (*ReferSys) RemoveReference

func (i *ReferSys) RemoveReference(cid string) error

RemoveReference reduce refer

Jump to

Keyboard shortcuts

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