bidengine

package
v0.9.0-rc5 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2020 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBidQuantityInvalid = errors.New("A bid quantity is invalid")
View Source
var 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 added in v0.9.1

type BidPricingStrategy interface {
	// contains filtered or unexported methods
}

func MakeRandomRangePricing added in v0.9.1

func MakeRandomRangePricing() (BidPricingStrategy, error)

func MakeScalePricing added in v0.9.1

func MakeScalePricing(
	cpuScale uint64,
	memoryScale uint64,
	storageScale uint64,
	endpointScale uint64) (BidPricingStrategy, error)

func MakeShellScriptPricing added in v0.9.1

func MakeShellScriptPricing(path string, processLimit uint, runtimeLimit time.Duration) (BidPricingStrategy, error)

type Service

type Service interface {
	StatusClient
	Close() error
	Done() <-chan struct{}
}

Service handles bidding on orders.

func NewService

func NewService(ctx context.Context, session session.Session, cluster cluster.Cluster, bus pubsub.Bus, bps BidPricingStrategy) (Service, error)

NewService creates new service instance and returns error incase of failure

type Status added in v0.6.0

type Status struct {
	Orders uint32 `json:"orders"`
}

Status stores orders

type StatusClient added in v0.3.4

type StatusClient interface {
	Status(context.Context) (*Status, error)
}

StatusClient interface predefined with Status method

Jump to

Keyboard shortcuts

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