Documentation ¶
Index ¶
- Constants
- Variables
- type BidPricingStrategy
- func MakeRandomRangePricing() (BidPricingStrategy, error)
- func MakeScalePricing(cpuScale decimal.Decimal, memoryScale decimal.Decimal, storageScale Storage, ...) (BidPricingStrategy, error)
- func MakeShellScriptPricing(path string, processLimit uint, runtimeLimit time.Duration) (BidPricingStrategy, error)
- type Config
- type ProviderAttrSignatureService
- type Request
- type Service
- type Status
- type StatusClient
- type Storage
Constants ¶
View Source
const (
DefaultPricePrecision = 6
)
Variables ¶
View Source
var ( ErrBidQuantityInvalid = errors.New("A bid quantity is invalid") ErrBidZero = errors.New("A bid of zero was produced") )
View Source
var ErrNotRunning = errors.New("not running")
ErrNotRunning declares new error with message "not running"
Functions ¶
This section is empty.
Types ¶
type BidPricingStrategy ¶
type BidPricingStrategy interface {
CalculatePrice(ctx context.Context, req Request) (sdk.DecCoin, error)
}
func MakeRandomRangePricing ¶
func MakeRandomRangePricing() (BidPricingStrategy, error)
func MakeScalePricing ¶
func MakeShellScriptPricing ¶
type Config ¶
type Config struct { PricingStrategy BidPricingStrategy Deposit sdk.Coin BidTimeout time.Duration Attributes types.Attributes MaxGroupVolumes int }
type Service ¶
type Service interface { StatusClient Close() error Done() <-chan struct{} }
Service handles bidding on orders.
type StatusClient ¶
type StatusClient interface { Status(context.Context) (*Status, error) StatusV1(ctx context.Context) (*provider.BidEngineStatus, error) }
StatusClient interface predefined with Status method
type Storage ¶
func (Storage) AllLessThenOrEqual ¶
AllLessThenOrEqual check all storage classes fit into max limits note better have dedicated limits for each class
func (Storage) IsAnyNegative ¶
Click to show internal directories.
Click to hide internal directories.