Documentation ¶
Index ¶
- Constants
- Variables
- func NewEstimatorMessage(id string, err error, values manifest.FlatMap) (res bus.Message)
- type Blackhole
- func (b Blackhole) Close() error
- func (b Blackhole) Create(id string, resource *allocation.Resource) (err error)
- func (b Blackhole) Destroy(id string) (err error)
- func (b Blackhole) Results() (id string, ctx context.Context, ch chan *Result)
- func (b Blackhole) Shutdown()
- func (b Blackhole) Update(id string, resource *allocation.Resource) (err error)
- type Config
- type GlobalConfig
- type Invalid
- func (b Invalid) Close() error
- func (b Invalid) Create(id string, resource *allocation.Resource) (err error)
- func (b Invalid) Destroy(id string) (err error)
- func (b Invalid) Results() (id string, ctx context.Context, ch chan *Result)
- func (b Invalid) Shutdown()
- func (b Invalid) Update(id string, resource *allocation.Resource) (err error)
- type Range
- func (b Range) Close() error
- func (b Range) Create(id string, resource *allocation.Resource) (err error)
- func (b Range) Destroy(id string) (err error)
- func (b Range) Results() (id string, ctx context.Context, ch chan *Result)
- func (b Range) Shutdown()
- func (b Range) Update(id string, resource *allocation.Resource) (err error)
- type Result
Constants ¶
View Source
const (
BlackholeEstimator = "blackhole" // blackhole estimator name
)
Variables ¶
View Source
var ( ErrNotAvailable = errors.New("not-available") ErrInvalidProvider = errors.New("invalid-provider-kind") )
Functions ¶
Types ¶
type Blackhole ¶
type Blackhole struct {
// contains filtered or unexported fields
}
Blackhole estimator accepts all requests but evaluates only destroys
func NewBlackhole ¶
func NewBlackhole(globalConfig GlobalConfig, config Config) (b *Blackhole)
func (Blackhole) Create ¶
func (b Blackhole) Create(id string, resource *allocation.Resource) (err error)
type Config ¶
type Config struct { Ctx context.Context Log *logx.Log Provider *allocation.Provider Id string // Full provider ID }
Config
type Invalid ¶
type Invalid struct {
// contains filtered or unexported fields
}
Invalid estimator accepts resource requests but always responds that all of them are failed
func NewInvalid ¶
func NewInvalid(globalConfig GlobalConfig, config Config) (i *Invalid)
func (Invalid) Create ¶
func (b Invalid) Create(id string, resource *allocation.Resource) (err error)
Click to show internal directories.
Click to hide internal directories.