From 775853cef86a7cf236ef307a8e19d76a8e14bd2d Mon Sep 17 00:00:00 2001 From: Phillip Michelsen Date: Tue, 23 Sep 2025 02:08:03 +0800 Subject: [PATCH] Started worker instruction handling via Execute() method --- services/data_service/internal/worker/worker.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/services/data_service/internal/worker/worker.go b/services/data_service/internal/worker/worker.go index 6aca591..384c8f7 100644 --- a/services/data_service/internal/worker/worker.go +++ b/services/data_service/internal/worker/worker.go @@ -3,6 +3,7 @@ package worker import ( + "context" "errors" "log/slog" "sync" @@ -25,10 +26,14 @@ type SessionController interface { CloseSession(id uuid.UUID) error } +type Instruction struct{} + type Worker interface { Start(workerID uuid.UUID, controller SessionController, cfg []byte) error Stop() error + Execute(ctx context.Context, inst Instruction) error + IsRunning() bool ID() uuid.UUID }