resourcetest

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2017 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(r mesos.Resources) *mesos.Offer_Operation

func Expect

func Expect(t *testing.T, cond bool, msgformat string, args ...interface{}) bool

func Reserve

func Reserve(r mesos.Resources) *mesos.Offer_Operation

func ReservedBy

func ReservedBy(principal string) *mesos.Resource_ReservationInfo

func Resource

func Resource(opt ...Opt) (r mesos.Resource)

func Resources

func Resources(r ...mesos.Resource) (result mesos.Resources)

func Unreserve

func Unreserve(r mesos.Resources) *mesos.Offer_Operation

Types

type Opt

type Opt func(*mesos.Resource)

Opt is a functional resource modifier

func Disk

func Disk(persistenceID, containerPath string) Opt

func DiskWithSource

func DiskWithSource(persistenceID, containerPath, source string, sourceType mesos.Resource_DiskInfo_Source_Type) Opt

func Name

func Name(x string) Opt

func Reservation

func Reservation(ri *mesos.Resource_ReservationInfo) Opt

func Revocable

func Revocable() Opt

func Role

func Role(x string) Opt

func ValueRange

func ValueRange(p ...RangeOpt) Opt

func ValueScalar

func ValueScalar(x float64) Opt

func ValueSet

func ValueSet(x ...string) Opt

type RangeOpt

type RangeOpt func(*mesos.Ranges)

func Span

func Span(bp, ep uint64) RangeOpt

Span naively appends a range to a Ranges collection ("range" is a keyword, so I called this func "Span")

Jump to

Keyboard shortcuts

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