pricing

package
v0.19.12 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const NonPreemptibleRunningPrice = 1_000_000

Variables

This section is empty.

Functions

Types

type Bid

type Bid struct {
	RunningBid float64
	QueuedBid  float64
}

type BidPriceCache

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

func (*BidPriceCache) GetBidPrices

func (p *BidPriceCache) GetBidPrices(ctx *armadacontext.Context) (BidPriceSnapshot, error)

func (*BidPriceCache) Initialise

func (p *BidPriceCache) Initialise(ctx *armadacontext.Context) error

func (*BidPriceCache) Run

type BidPriceProvider

type BidPriceProvider interface {
	GetBidPrices(ctx *armadacontext.Context) (BidPriceSnapshot, error)
}

type BidPriceSnapshot

type BidPriceSnapshot struct {
	Timestamp     time.Time
	Bids          map[PriceKey]map[string]Bid
	ResourceUnits map[string]internaltypes.ResourceList
}

func (*BidPriceSnapshot) GetPrice

func (s *BidPriceSnapshot) GetPrice(queue string, band bidstore.PriceBand) (map[string]Bid, bool)

type ExternalBidPriceService

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

func (*ExternalBidPriceService) GetBidPrices

type LocalBidPriceService

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

func NewLocalBidPriceService

func NewLocalBidPriceService(pools []string, queueCache queue.QueueCache) *LocalBidPriceService

func (*LocalBidPriceService) GetBidPrices

type NoopBidPriceProvider

type NoopBidPriceProvider struct{}

func (NoopBidPriceProvider) GetBidPrices

type PriceKey

type PriceKey struct {
	Queue string
	Band  bidstore.PriceBand
}

Jump to

Keyboard shortcuts

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