package resourcetest
import "github.com/mesos/mesos-go/api/v1/lib/resourcetest"
Index ¶
- func Create(r mesos.Resources) *mesos.Offer_Operation
- func DynamicReservation(role, principal string, labels ...mesos.Label) (ri mesos.Resource_ReservationInfo)
- func Expect(t *testing.T, cond bool, msgformat string, args ...interface{}) bool
- func Label(k, v string) mesos.Label
- func Reserve(r mesos.Resources) *mesos.Offer_Operation
- func ReservedBy(principal string) *mesos.Resource_ReservationInfo
- func Resource(opt ...Opt) (r mesos.Resource)
- func Resources(r ...mesos.Resource) (result mesos.Resources)
- func StaticReservation(role, principal string, labels ...mesos.Label) (ri mesos.Resource_ReservationInfo)
- func Unreserve(r mesos.Resources) *mesos.Offer_Operation
- type Opt
- func Disk(persistenceID, containerPath string) Opt
- func DiskWithSource(persistenceID, containerPath, source string, sourceType mesos.Resource_DiskInfo_Source_Type) Opt
- func Name(x string) Opt
- func Reservation(ri *mesos.Resource_ReservationInfo) Opt
- func Reservations(ri ...mesos.Resource_ReservationInfo) Opt
- func Revocable() Opt
- func Role(x string) Opt
- func ValueRange(p ...RangeOpt) Opt
- func ValueScalar(x float64) Opt
- func ValueSet(x ...string) Opt
- type RangeOpt
Functions ¶
func Create ¶
func Create(r mesos.Resources) *mesos.Offer_Operation
func DynamicReservation ¶
func DynamicReservation(role, principal string, labels ...mesos.Label) (ri mesos.Resource_ReservationInfo)
func Expect ¶
func Label ¶
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 ¶
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 DiskWithSource ¶
func DiskWithSource(persistenceID, containerPath, source string, sourceType mesos.Resource_DiskInfo_Source_Type) Opt
func Name ¶
func Reservation ¶
func Reservation(ri *mesos.Resource_ReservationInfo) Opt
Reservation should only be used for pre-reservation-refinement testing
func Reservations ¶
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 ValueRange ¶
func ValueScalar ¶
func ValueSet ¶
type RangeOpt ¶
type RangeOpt func(*mesos.Ranges)
func Span ¶
Span naively appends a range to a Ranges collection ("range" is a keyword, so I called this func "Span")
Source Files ¶
- Version
- v0.0.11 (latest)
- Published
- May 15, 2020
- Platform
- linux/amd64
- Imports
- 2 packages
- Last checked
- 2 hours ago –
Tools for package owners.