Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AvailableCapacityStrategy ¶
type AvailableCapacityStrategy struct {
// contains filtered or unexported fields
}
func NewAvailableCapacityStrategy ¶
func NewAvailableCapacityStrategy(ctx context.Context, params AvailableCapacityStrategyParams) *AvailableCapacityStrategy
func (*AvailableCapacityStrategy) ShouldBidBasedOnUsage ¶
func (s *AvailableCapacityStrategy) ShouldBidBasedOnUsage( ctx context.Context, request bidstrategy.BidStrategyRequest, usage models.Resources) (bidstrategy.BidStrategyResponse, error)
type ChainedResourceBidStrategy ¶
type ChainedResourceBidStrategy struct {
Strategies []bidstrategy.ResourceBidStrategy
}
func NewChainedResourceBidStrategy ¶
func NewChainedResourceBidStrategy(strategies ...bidstrategy.ResourceBidStrategy) *ChainedResourceBidStrategy
func (*ChainedResourceBidStrategy) AddStrategy ¶
func (c *ChainedResourceBidStrategy) AddStrategy(strategy bidstrategy.ResourceBidStrategy)
AddStrategy Add new strategy to the end of the chain
func (*ChainedResourceBidStrategy) ShouldBidBasedOnUsage ¶
func (c *ChainedResourceBidStrategy) ShouldBidBasedOnUsage( ctx context.Context, request bidstrategy.BidStrategyRequest, usage models.Resources) (bidstrategy.BidStrategyResponse, error)
ShouldBidBasedOnUsage Iterate over all strategies, and return shouldBid if no error is thrown and none of the strategies return should not bid.
type MaxCapacityStrategy ¶
type MaxCapacityStrategy struct {
// contains filtered or unexported fields
}
func NewMaxCapacityStrategy ¶
func NewMaxCapacityStrategy(params MaxCapacityStrategyParams) *MaxCapacityStrategy
func (*MaxCapacityStrategy) ShouldBidBasedOnUsage ¶
func (s *MaxCapacityStrategy) ShouldBidBasedOnUsage( ctx context.Context, request bidstrategy.BidStrategyRequest, usage models.Resources) (bidstrategy.BidStrategyResponse, error)
Click to show internal directories.
Click to hide internal directories.