| 657 | typename TCommandInfo, |
| 658 | typename TFrameworkID> |
| 659 | inline TExecutorInfo createExecutorInfo( |
| 660 | const TExecutorID& executorId, |
| 661 | const Option<TCommandInfo>& command, |
| 662 | const Option<TResources>& resources, |
| 663 | const Option<typename TExecutorInfo::Type>& type, |
| 664 | const Option<TFrameworkID>& frameworkId) |
| 665 | { |
| 666 | TExecutorInfo executor; |
| 667 | executor.mutable_executor_id()->CopyFrom(executorId); |
| 668 | if (command.isSome()) { |
| 669 | executor.mutable_command()->CopyFrom(command.get()); |
| 670 | } |
| 671 | if (resources.isSome()) { |
| 672 | executor.mutable_resources()->CopyFrom(resources.get()); |
| 673 | } |
| 674 | if (type.isSome()) { |
| 675 | executor.set_type(type.get()); |
| 676 | } |
| 677 | if (frameworkId.isSome()) { |
| 678 | executor.mutable_framework_id()->CopyFrom(frameworkId.get()); |
| 679 | } |
| 680 | return executor; |
| 681 | } |
| 682 | |
| 683 | |
| 684 | template <typename TExecutorInfo, |
no test coverage detected