resource

package
v0.0.0-...-4413804 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2015 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ComputeRequest

type ComputeRequest struct {
	ComputeResource
	DataLocation Location
}

func (*ComputeRequest) Fit

func (c *ComputeRequest) Fit(r *ResourceOffer) (score float32, ok bool)

type ComputeResource

type ComputeResource struct {
	CPUCount     int
	CPULevel     int // higher number means higher compute power
	MemorySizeMB int
}

type Location

type Location struct {
	DataCenter string
	Rack       string
	Server     string
	Port       int
}

func (Location) Distance

func (a Location) Distance(b Location) float32

the distance is a relative value, similar to network lantency

type ResourceOffer

type ResourceOffer struct {
	ComputeResource
	ServerLocation Location
}

Jump to

Keyboard shortcuts

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