summaryrefslogtreecommitdiff
path: root/internal/server/handlers/serverhandler.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2021-10-13 21:10:28 +0300
committerPaul Buetow <paul@buetow.org>2021-10-14 20:11:23 +0300
commit1dead22129a26e4f532e68c2c63fe4122b519506 (patch)
treeb5ab02d2400767410b8dec5183aa9f83d092f0d4 /internal/server/handlers/serverhandler.go
parent5f3e6b8569b5b71853208949506bbcd3c44488b5 (diff)
Merging grep context from master
Diffstat (limited to 'internal/server/handlers/serverhandler.go')
-rw-r--r--internal/server/handlers/serverhandler.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/internal/server/handlers/serverhandler.go b/internal/server/handlers/serverhandler.go
index 52c4570..36574a9 100644
--- a/internal/server/handlers/serverhandler.go
+++ b/internal/server/handlers/serverhandler.go
@@ -8,6 +8,7 @@ import (
"github.com/mimecast/dtail/internal"
"github.com/mimecast/dtail/internal/io/dlog"
"github.com/mimecast/dtail/internal/io/line"
+ "github.com/mimecast/dtail/internal/lcontext"
"github.com/mimecast/dtail/internal/omode"
user "github.com/mimecast/dtail/internal/user/server"
)
@@ -53,8 +54,8 @@ func NewServerHandler(user *user.User, catLimiter,
return &h
}
-func (h *ServerHandler) handleUserCommand(ctx context.Context, argc int,
- args []string, commandName string) {
+func (h *ServerHandler) handleUserCommand(ctx context.Context, ltx lcontext.LContext,
+ argc int, args []string, commandName string) {
dlog.Server.Debug(h.user, "Handling user command", argc, args)
h.incrementActiveCommands()
@@ -68,13 +69,13 @@ func (h *ServerHandler) handleUserCommand(ctx context.Context, argc int,
case "grep", "cat":
command := newReadCommand(h, omode.CatClient)
go func() {
- command.Start(ctx, argc, args, 1)
+ command.Start(ctx, ltx, argc, args, 1)
commandFinished()
}()
case "tail":
command := newReadCommand(h, omode.TailClient)
go func() {
- command.Start(ctx, argc, args, 10)
+ command.Start(ctx, ltx, argc, args, 10)
commandFinished()
}()
case "map":