dataOverlay

package
v0.0.0-...-79bdfdd Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2023 License: GPL-3.0 Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package dataOverlay is one of the Butter dataOverlay overlay implementations. Other are available on the butter-network GitHub repository.

Index

Constants

View Source
const BlockSize = int(unsafe.Sizeof(Block{}))

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

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

A Block is the atomic unit of storage for butter. Extra meta-data is attached to the data field (i.e. keywords, part-count and geotag) to improve storage and IR performance. A Block is uniquely identified by combining its uuid

and part number e.g. <UUID>/<PartNumber>.

func (*Block) Data

func (b *Block) Data() []byte

Data field getter for a Block

type Id

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

type Overlay

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

Overlay that complies with the Butter dataOverlay interface

func NewOverlay

func NewOverlay(node *node.Node) Overlay

func (*Overlay) AddInformation

func (o *Overlay) AddInformation(keywords []string, data []byte) string

func (*Overlay) AvailableStorage

func (o *Overlay) AvailableStorage() uint64

func (*Overlay) Block

func (o *Overlay) Block(idString string) (Block, error)

Block from the node's storage by its UUID. If the block is not found, an empty block with an error is returned.

func (*Overlay) Node

func (o *Overlay) Node() *node.Node

Jump to

Keyboard shortcuts

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