diff options
Diffstat (limited to 'internal/server/background')
| -rw-r--r-- | internal/server/background/commands.go | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/internal/server/background/commands.go b/internal/server/background/commands.go new file mode 100644 index 0000000..f789150 --- /dev/null +++ b/internal/server/background/commands.go @@ -0,0 +1,28 @@ +package background + +import ( + "context" + "sync" +) + +type command struct { + cancel context.CancelFunc + done chan struct{} +} + +type Commands struct { + mutex sync.Mutex + commands map[string]command +} + +func NewCommands() *Commands { + return &Commands{ + commands: make(map[string]command), + } +} + +func (b Commands) Add(argc int, args []string, cancel context.CancelFunc, done <-chan struct{}) { +} + +func (h Commands) Stop(argc int, args []string) { +} |
