bloom

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2025 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OpenFilter added in v1.4.0

func OpenFilter(filter string, proto bool) (*bloomfilter.Filter, error)

Types

type Bloom

type Bloom struct {
	Create     CreateFilter `cmd:"" help:"create bloom filter based on a list of piece IDs"`
	Generate   Generate     `cmd:"" help:"generate bloom filter with all one"`
	Check      Check        `cmd:"" help:"checks piece ids (from file) against a bloom filter"`
	MultiCheck MultiCheck   `cmd:"" help:"check pieces in multiple bloom filters"`
	Info       Info         `cmd:"" help:"print out bloom filter metadata"`

	Send       Send       `cmd:"" help:"send bloom filter to a storagenode, with raw RPC call"`
	SendClient SendClient `cmd:"" help:"send bloom filter to a storagenode, with piecestore client"`
	Find       Find       `cmd:"" help:"Find BF for specific nodes in the generated ZIP files"`
	Unwrap     Unwrap     `cmd:"" help:"unwrap a bloom filter (form pb representation to raw filter)"`

	Parameters Parameters `cmd:"" help:"Show optimal size parameters"`
}

type Check

type Check struct {
	Filter      string `default:"bloom.filter"`
	Pieces      string `default:"" required:"true"`
	Proto       bool   `help:"force protobuf based deserialization" default:"false"`
	ShowMissing int    `help:"Show this number if missing piece IDs (file based processing)" default:"0"`
}

func (Check) Run

func (c Check) Run() error

type ChunkReader

type ChunkReader struct {
	io.ReaderAt
	// contains filtered or unexported fields
}

func (*ChunkReader) ReadAt

func (t *ChunkReader) ReadAt(p []byte, off int64) (n int, err error)

type CreateFilter

type CreateFilter struct {
	PiecesFile        string      `default:"pieces.txt"`
	FalsePositiveRate float64     `default:"0.01"`
	ExpectedElement   int64       `default:"10000000"`
	MaxMemory         memory.Size `default:"2000000"`
	Output            string      `default:"bloom.filter"`
}

func (CreateFilter) Run

func (c CreateFilter) Run() error

type Find

type Find struct {
	NodeID []storj.NodeID `arg:""`
	Bucket string
	Prefix string
}

func (Find) Run

func (f Find) Run() error

type Generate

type Generate struct {
	NodeID storj.NodeID `arg:""`
	Size   memory.Size  `default:"2000000"`
	Output string       `default:"bloom.filter"`
}

func (Generate) Run

func (c Generate) Run() error

type Info

type Info struct {
	BloomFilterFile string `arg:""`
	Request         bool   `help:"Read the binary as a RetainRequest instead of RetainInfo"`
}

func (Info) Run

func (i Info) Run() error

type MultiCheck added in v1.4.0

type MultiCheck struct {
	Filters []string `default:""`
	Pieces  string   `default:"" required:"true"`
	Proto   bool     `help:"force protobuf based deserialization" default:"false"`
}

func (MultiCheck) Run added in v1.4.0

func (c MultiCheck) Run() error

type Parameters added in v1.5.0

type Parameters struct {
}

func (Parameters) Run added in v1.5.0

func (r Parameters) Run() error

type Retain added in v1.4.0

type Retain struct {
	Hashstore   string `arg:"" help:"the path to the hashstore"`
	BloomFilter string `arg:"" help:"the path to the bloom filter"`
}

func (*Retain) Run added in v1.4.0

func (r *Retain) Run() error

type Send

type Send struct {
	util.DialerHelper
	URL  storj.NodeURL
	Size int `default:"200000"`
}

func (Send) Run

func (s Send) Run() error

type SendClient

type SendClient struct {
	util.DialerHelper
	URL    storj.NodeURL
	Filter string `arg:""`
}

func (SendClient) Run

func (s SendClient) Run() error

type Unwrap added in v1.3.0

type Unwrap struct {
	BloomFilterFile string `arg:""`
}

func (Unwrap) Run added in v1.3.0

func (i Unwrap) Run() error

Jump to

Keyboard shortcuts

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