mirror of
https://github.com/vale981/ray
synced 2025-03-06 10:31:39 -05:00
32 lines
883 B
C++
32 lines
883 B
C++
#include "ray/common/id.h"
|
|
#include "ray/protobuf/common.pb.h"
|
|
#include "ray/util/util.h"
|
|
|
|
#include "runtime_context.h"
|
|
#include "util/streaming_logging.h"
|
|
|
|
namespace ray {
|
|
namespace streaming {
|
|
|
|
void RuntimeContext::SetConfig(const StreamingConfig &streaming_config) {
|
|
STREAMING_CHECK(runtime_status_ == RuntimeStatus::Init)
|
|
<< "set config must be at beginning";
|
|
config_ = streaming_config;
|
|
}
|
|
|
|
void RuntimeContext::SetConfig(const uint8_t *data, uint32_t size) {
|
|
STREAMING_CHECK(runtime_status_ == RuntimeStatus::Init)
|
|
<< "set config must be at beginning";
|
|
if (!data) {
|
|
STREAMING_LOG(WARNING) << "buffer pointer is null, but len is => " << size;
|
|
return;
|
|
}
|
|
config_.FromProto(data, size);
|
|
}
|
|
|
|
RuntimeContext::~RuntimeContext() {}
|
|
|
|
RuntimeContext::RuntimeContext() : runtime_status_(RuntimeStatus::Init) {}
|
|
|
|
} // namespace streaming
|
|
} // namespace ray
|