resourcetest

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: May 15, 2020 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 DynamicReservation added in v0.0.7

func DynamicReservation(role, principal string, labels ...mesos.Label) (ri mesos.Resource_ReservationInfo)

func Expect

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

func Label added in v0.0.7

func Label(k, v string) mesos.Label

func Reserve

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

func ReservedBy

func ReservedBy(principal string) *mesos.Resource_ReservationInfo

ReservedBy returns a reservation for the given principal, if specified; intended for use with pre-reservation-refinement resources.

func Resource

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

func Resources

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

func StaticReservation added in v0.0.7

func StaticReservation(role, principal string, labels ...mesos.Label) (ri mesos.Resource_ReservationInfo)

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

Reservation should only be used for pre-reservation-refinement testing

func Reservations added in v0.0.7

func Reservations(ri ...mesos.Resource_ReservationInfo) Opt

Reservations should only be used for post-reservation-refinement testing

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