package resourcetest

import "github.com/mesos/mesos-go/api/v1/lib/resourcetest"

Index

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")

Source Files

resourcetest.go

Version
v0.0.6
Published
Mar 12, 2018
Platform
js/wasm
Imports
2 packages
Last checked
3 hours ago

Tools for package owners.