story: DGR-037 Bind llama.cpp to the standalone worker

This commit is contained in:
Dobromir Popov
2026-08-01 01:28:06 +03:00
parent dfa403adc6
commit 8217b4c4a2
9 changed files with 482 additions and 54 deletions

View File

@@ -19,7 +19,7 @@
#include <grpcpp/grpcpp.h>
#include "fake_engine.h"
#include "llama_shard_engine.h"
#include "shard_runtime.grpc.pb.h"
#include "shard_runtime.pb.h"
@@ -55,7 +55,7 @@ struct SessionState {
class ShardRuntimeServiceImpl final : public sp::ShardRuntime::Service {
public:
explicit ShardRuntimeServiceImpl(FlowLimits limits) : limits_(limits) {}
ShardRuntimeServiceImpl(FlowLimits limits, ShardEngine& engine) : limits_(limits), engine_(engine) {}
grpc::Status GetCapability(grpc::ServerContext* context,
const sp::CapabilityRequest* request,
@@ -86,7 +86,7 @@ class ShardRuntimeServiceImpl final : public sp::ShardRuntime::Service {
FlowLimits NegotiateFlow(const sp::FlowControl& proposed) const;
FlowLimits limits_;
FakeShardEngine engine_;
ShardEngine& engine_;
std::mutex sessions_mu_;
std::map<std::string, SessionState> sessions_;
};