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 }