blob: 9191d81b82290c9c25451132c72d55e384f3e721 [file] [log] [blame]
#ifndef THIRD_PARTY_MILOTIC_EXTERNAL_CC_TLBMC_UTILS_COMMAND_EXECUTOR_H_
#define THIRD_PARTY_MILOTIC_EXTERNAL_CC_TLBMC_UTILS_COMMAND_EXECUTOR_H_
#include <string>
#include "absl/status/statusor.h"
namespace milotic_tlbmc {
// Abstract class for executing shell commands.
// This allows for swapping out the real implementation with a mock in tests.
class CommandExecutor {
public:
virtual ~CommandExecutor() = default;
virtual absl::StatusOr<std::string> Execute(
const std::string &command) const = 0;
};
} // namespace milotic_tlbmc
#endif // THIRD_PARTY_MILOTIC_EXTERNAL_CC_TLBMC_UTILS_COMMAND_EXECUTOR_H_