summaryrefslogtreecommitdiff
path: root/internal/server/background
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2020-02-20 08:11:27 +0000
committerPaul Buetow <paul@buetow.org>2020-02-20 08:11:27 +0000
commit5122df790b77fb915c910e57de260e6ed0563af7 (patch)
tree0ce1f65d663040d906fef6cd29a5f1245c36e64a /internal/server/background
parentc8dc769190404b3901a8d58ab1107c0328cd5b59 (diff)
initial background commands
Diffstat (limited to 'internal/server/background')
-rw-r--r--internal/server/background/commands.go28
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) {
+}