pricer

package
v2.2.0-rc5 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2024 License: BSD-3-Clause Imports: 1 Imported by: 2

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