pricer

package
v1.18.2 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: BSD-3-Clause Imports: 1 Imported by: 2 modules, 3 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FixedPricer

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

FixedPricer is a Pricer that has a fixed price for chunks.

func NewFixedPricer

func NewFixedPricer(overlay swarm.Address, poPrice uint64) *FixedPricer

NewFixedPricer returns a new FixedPricer with a given price.

func (*FixedPricer) PeerPrice

func (pricer *FixedPricer) PeerPrice(peer, chunk swarm.Address) uint64

PeerPrice implements Pricer.

func (*FixedPricer) Price

func (pricer *FixedPricer) Price(chunk swarm.Address) uint64

Price implements Pricer.

type Interface

type Interface interface {
	// PeerPrice is the price the peer charges for a given chunk hash.
	PeerPrice(peer, chunk swarm.Address) uint64
	// Price is the price we charge for a given chunk hash.
	Price(chunk swarm.Address) uint64
}

Pricer returns pricing information for chunk hashes.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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