basic

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

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

Go to latest
Published: Mar 1, 2023 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BalanceFetcher

type BalanceFetcher interface {
	Balance(id user.ID) (*big.Int, error)
}

BalanceFetcher uses NEP-17 compatible balance contract.

type EstimationFetcher

type EstimationFetcher interface {
	Estimations(uint64) ([]*container.Estimations, error)
}

type IncomeSettlementContext

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

func (*IncomeSettlementContext) Collect

func (inc *IncomeSettlementContext) Collect()

func (*IncomeSettlementContext) Distribute

func (inc *IncomeSettlementContext) Distribute()

type IncomeSettlementContextPrms

type IncomeSettlementContextPrms struct {
	Log         *logger.Logger
	Epoch       uint64
	Rate        RateFetcher
	Estimations EstimationFetcher
	Balances    BalanceFetcher
	Container   common.ContainerStorage
	Placement   common.PlacementCalculator
	Exchange    common.Exchanger
	Accounts    common.AccountStorage
}

type NodeSizeTable

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

NodeSizeTable is not thread safe, make sure it is accessed with external locks or in single routine.

func NewNodeSizeTable

func NewNodeSizeTable() *NodeSizeTable

func (*NodeSizeTable) Iterate

func (t *NodeSizeTable) Iterate(f func([]byte, *big.Int))

func (*NodeSizeTable) Put

func (t *NodeSizeTable) Put(id []byte, avg uint64)

func (*NodeSizeTable) Total

func (t *NodeSizeTable) Total() *big.Int

type RateFetcher

type RateFetcher interface {
	BasicRate() (uint64, error)
}

Jump to

Keyboard shortcuts

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