17 #ifndef __RESOURCES_UTILS_HPP__ 18 #define __RESOURCES_UTILS_HPP__ 22 #include <google/protobuf/repeated_field.h> 49 const Resources& resources,
50 const Resources& checkpointedResources);
66 const Resources& resources);
159 google::protobuf::RepeatedPtrField<Resource>* resources,
165 std::vector<Resource>* resources,
174 void upgradeResources(google::protobuf::RepeatedPtrField<Resource>* resources);
211 google::protobuf::RepeatedPtrField<Resource>* resources);
249 #endif // __RESOURCES_UTILS_HPP__
Try< Nothing > downgradeResources(google::protobuf::RepeatedPtrField< Resource > *resources)
Definition: resources_utils.hpp:125
Definition: resource_quantities.hpp:192
Definition: resource_quantities.hpp:63
Definition: resources.hpp:83
void convertResourceFormat(Resource *resource, ResourceFormat format)
Resources shrinkResources(const Resources &resources, ResourceQuantities target)
Operation
Definition: cgroups.hpp:444
void upgradeResources(google::protobuf::RepeatedPtrField< Resource > *resources)
Definition: resources_utils.hpp:106
Definition: resources_utils.hpp:146
Result< ResourceProviderID > getResourceProviderId(const Offer::Operation &operation)
bool needCheckpointing(const Resource &resource)
Try< Resources > applyCheckpointedResources(const Resources &resources, const Resources &checkpointedResources)
void upgradeResource(Resource *resource)
Try< std::string > format(const std::string &fmt, va_list args)
Definition: format.hpp:68
Try< std::vector< ResourceConversion > > getResourceConversions(const Offer::Operation &operation)
Option< Error > validateAndUpgradeResources(Offer::Operation *operation)
Try< Nothing > downgradeResource(Resource *resource)
ResourceFormat
Definition: resources_utils.hpp:92