Apache Mesos
Classes | Namespaces | Functions
protobuf_utils.hpp File Reference
#include <initializer_list>
#include <ostream>
#include <set>
#include <string>
#include <sys/stat.h>
#include <google/protobuf/map.h>
#include <mesos/mesos.hpp>
#include <mesos/maintenance/maintenance.hpp>
#include <mesos/master/master.hpp>
#include <mesos/slave/isolator.hpp>
#include <process/time.hpp>
#include <stout/duration.hpp>
#include <stout/ip.hpp>
#include <stout/none.hpp>
#include <stout/option.hpp>
#include <stout/try.hpp>
#include <stout/uuid.hpp>
#include "master/registry.hpp"
#include "messages/messages.hpp"

Go to the source code of this file.

Classes

class  mesos::internal::protobuf::WireFormatLite2
 
class  mesos::internal::protobuf::UnionValidator
 
struct  mesos::internal::protobuf::slave::Capabilities
 
struct  mesos::internal::protobuf::master::Capabilities
 
struct  mesos::internal::protobuf::framework::Capabilities
 

Namespaces

 process
 
 mesos
 
 mesos::internal
 
 mesos::internal::master
 
 mesos::internal::protobuf
 
 mesos::internal::protobuf::slave
 
 mesos::internal::protobuf::maintenance
 
 mesos::internal::protobuf::master
 
 mesos::internal::protobuf::master::event
 
 mesos::internal::protobuf::framework
 

Functions

template<class ProtobufUnion >
Option< Errormesos::internal::protobuf::validateProtobufUnion (const ProtobufUnion &message)
 
bool mesos::internal::protobuf::frameworkHasCapability (const FrameworkInfo &framework, FrameworkInfo::Capability::Type capability)
 
bool mesos::internal::protobuf::isTerminalState (const TaskState &state)
 
StatusUpdate mesos::internal::protobuf::createStatusUpdate (const FrameworkID &frameworkId, const Option< SlaveID > &slaveId, const TaskID &taskId, const TaskState &state, const TaskStatus::Source &source, const Option< id::UUID > &uuid, const std::string &message="", const Option< TaskStatus::Reason > &reason=None(), const Option< ExecutorID > &executorId=None(), const Option< bool > &healthy=None(), const Option< CheckStatusInfo > &checkStatus=None(), const Option< Labels > &labels=None(), const Option< ContainerStatus > &containerStatus=None(), const Option< TimeInfo > &unreachableTime=None(), const Option< Resources > &limitedResources=None())
 
StatusUpdate mesos::internal::protobuf::createStatusUpdate (const FrameworkID &frameworkId, const TaskStatus &status, const Option< SlaveID > &slaveId)
 
TaskStatus mesos::internal::protobuf::createTaskStatus (const TaskID &taskId, const TaskState &state, const id::UUID &uuid, double timestamp)
 
TaskStatus mesos::internal::protobuf::createTaskStatus (TaskStatus status, const id::UUID &uuid, double timestamp, const Option< TaskState > &state=None(), const Option< std::string > &message=None(), const Option< TaskStatus::Source > &source=None(), const Option< TaskStatus::Reason > &reason=None(), const Option< std::string > &data=None(), const Option< bool > &healthy=None(), const Option< CheckStatusInfo > &checkStatus=None(), const Option< Labels > &labels=None(), const Option< ContainerStatus > &containerStatus=None(), const Option< TimeInfo > &unreachableTime=None())
 
Task mesos::internal::protobuf::createTask (const TaskInfo &task, const TaskState &state, const FrameworkID &frameworkId)
 
Option< bool > mesos::internal::protobuf::getTaskHealth (const Task &task)
 
Option< CheckStatusInfo > mesos::internal::protobuf::getTaskCheckStatus (const Task &task)
 
Option< ContainerStatus > mesos::internal::protobuf::getTaskContainerStatus (const Task &task)
 
bool mesos::internal::protobuf::isTerminalState (const OperationState &state)
 
OperationStatus mesos::internal::protobuf::createOperationStatus (const OperationState &state, const Option< OperationID > &operationId=None(), const Option< std::string > &message=None(), const Option< Resources > &convertedResources=None(), const Option< id::UUID > &statusUUID=None(), const Option< SlaveID > &slaveId=None(), const Option< ResourceProviderID > &resourceProviderId=None())
 
Operation mesos::internal::protobuf::createOperation (const Offer::Operation &info, const OperationStatus &latestStatus, const Option< FrameworkID > &frameworkId, const Option< SlaveID > &slaveId, const Option< UUID > &operationUUID=None())
 
UpdateOperationStatusMessage mesos::internal::protobuf::createUpdateOperationStatusMessage (const UUID &operationUUID, const OperationStatus &status, const Option< OperationStatus > &latestStatus=None(), const Option< FrameworkID > &frameworkId=None(), const Option< SlaveID > &slaveId=None())
 
UUID mesos::internal::protobuf::createUUID (const Option< id::UUID > &uuid=None())
 
MasterInfo mesos::internal::protobuf::createMasterInfo (const process::UPID &pid)
 
Label mesos::internal::protobuf::createLabel (const std::string &key, const Option< std::string > &value=None())
 
Labels mesos::internal::protobuf::convertStringMapToLabels (const google::protobuf::Map< std::string, std::string > &map)
 
Try< google::protobuf::Map< std::string, std::string > > mesos::internal::protobuf::convertLabelsToStringMap (const Labels &labels)
 
void mesos::internal::protobuf::injectAllocationInfo (Offer::Operation *operation, const Resource::AllocationInfo &allocationInfo)
 
void mesos::internal::protobuf::stripAllocationInfo (Offer::Operation *operation)
 
bool mesos::internal::protobuf::isSpeculativeOperation (const Offer::Operation &operation)
 
google::protobuf::RepeatedPtrField< ResourceVersionUUID > mesos::internal::protobuf::createResourceVersions (const hashmap< Option< ResourceProviderID >, UUID > &resourceVersions)
 
hashmap< Option< ResourceProviderID >, UUID > mesos::internal::protobuf::parseResourceVersions (const google::protobuf::RepeatedPtrField< ResourceVersionUUID > &resourceVersionUUIDs)
 
TimeInfo mesos::internal::protobuf::getCurrentTime ()
 
FileInfo mesos::internal::protobuf::createFileInfo (const std::string &path, const struct stat &s)
 
ContainerID mesos::internal::protobuf::getRootContainerId (const ContainerID &containerId)
 
ContainerID mesos::internal::protobuf::parseContainerId (const std::string &value)
 
Try< Resources > mesos::internal::protobuf::getConsumedResources (const Offer::Operation &operation)
 
bool mesos::internal::protobuf::slave::operator== (const Capabilities &left, const Capabilities &right)
 
bool mesos::internal::protobuf::slave::operator!= (const Capabilities &left, const Capabilities &right)
 
std::ostream & mesos::internal::protobuf::slave::operator<< (std::ostream &stream, const Capabilities &c)
 
mesos::slave::ContainerLimitation mesos::internal::protobuf::slave::createContainerLimitation (const Resources &resources, const std::string &message, const TaskStatus::Reason &reason)
 
mesos::slave::ContainerState mesos::internal::protobuf::slave::createContainerState (const Option< ExecutorInfo > &executorInfo, const Option< ContainerInfo > &containerInfo, const ContainerID &id, pid_t pid, const std::string &directory)
 
mesos::slave::ContainerMountInfo mesos::internal::protobuf::slave::createContainerMount (const std::string &source, const std::string &target, unsigned long flags)
 
mesos::slave::ContainerMountInfo mesos::internal::protobuf::slave::createContainerMount (const std::string &source, const std::string &target, const std::string &type, unsigned long flags)
 
mesos::slave::ContainerMountInfo mesos::internal::protobuf::slave::createContainerMount (const std::string &source, const std::string &target, const std::string &type, const std::string &options, unsigned long flags)
 
mesos::slave::ContainerFileOperation mesos::internal::protobuf::slave::containerSymlinkOperation (const std::string &source, const std::string &target)
 
mesos::slave::ContainerFileOperation mesos::internal::protobuf::slave::containerRenameOperation (const std::string &source, const std::string &target)
 
mesos::slave::ContainerFileOperation mesos::internal::protobuf::slave::containerMkdirOperation (const std::string &target, const bool recursive)
 
mesos::slave::ContainerFileOperation mesos::internal::protobuf::slave::containerMountOperation (const mesos::slave::ContainerMountInfo &mnt)
 
Unavailability mesos::internal::protobuf::maintenance::createUnavailability (const process::Time &start, const Option< Duration > &duration=None())
 Helper for constructing an unavailability from a Time and Duration. More...
 
google::protobuf::RepeatedPtrField< MachineID > mesos::internal::protobuf::maintenance::createMachineList (std::initializer_list< MachineID > ids)
 Helper for constructing a list of MachineID. More...
 
mesos::maintenance::Window mesos::internal::protobuf::maintenance::createWindow (std::initializer_list< MachineID > ids, const Unavailability &unavailability)
 Helper for constructing a maintenance Window. More...
 
mesos::maintenance::Schedule mesos::internal::protobuf::maintenance::createSchedule (std::initializer_list< mesos::maintenance::Window > windows)
 Helper for constructing a maintenance Schedule. More...
 
void mesos::internal::protobuf::master::addMinimumCapability (google::protobuf::RepeatedPtrField< Registry::MinimumCapability > *capabilities, const MasterInfo::Capability::Type &capability)
 
void mesos::internal::protobuf::master::removeMinimumCapability (google::protobuf::RepeatedPtrField< Registry::MinimumCapability > *capabilities, const MasterInfo::Capability::Type &capability)
 
mesos::master::Event mesos::internal::protobuf::master::event::createTaskUpdated (const Task &task, const TaskState &state, const TaskStatus &status)
 
mesos::master::Event mesos::internal::protobuf::master::event::createTaskAdded (const Task &task)
 
mesos::master::Event mesos::internal::protobuf::master::event::createFrameworkAdded (const mesos::internal::master::Framework &framework)
 
mesos::master::Event mesos::internal::protobuf::master::event::createFrameworkUpdated (const mesos::internal::master::Framework &framework)
 
mesos::master::Event mesos::internal::protobuf::master::event::createFrameworkRemoved (const FrameworkInfo &frameworkInfo)
 
mesos::master::Response::GetAgents::Agent mesos::internal::protobuf::master::event::createAgentResponse (const mesos::internal::master::Slave &slave, const Option< DrainInfo > &drainInfo, bool deactivated, const Option< process::Owned< ObjectApprovers >> &approvers=None())
 
mesos::master::Event mesos::internal::protobuf::master::event::createAgentAdded (const mesos::internal::master::Slave &slave, const Option< DrainInfo > &drainInfo, bool deactivated)
 
mesos::master::Event mesos::internal::protobuf::master::event::createAgentRemoved (const SlaveID &slaveId)
 
std::set< std::string > mesos::internal::protobuf::framework::getRoles (const FrameworkInfo &frameworkInfo)