Started worker instruction handling via Execute() method
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user