1
0
mirror of https://github.com/golang/go synced 2024-10-01 01:18:32 -06:00
go/internal/lsp/cmd
Rob Findley 9ffc0ab4ef internal/jsonrpc2: add an idle timeout for stream serving
When running gopls against an automatically started remote instance, we
want the lifecycle of the remote to be detached from that of its
clients, so that it doesn't shut down while clients are still connected.
On the other hand, a gopls process can consume significant resources, so
we don't want it to remain when there are no more connected clients.

The jsonrpc2 package is updated to support the concept of idle timeout:
a duration after which the server is shut down when there are no
connected clients. This is exposed in the gopls serve command via the
-listen.timeout flag.

Update golang/go#34111

Change-Id: Id62b3d4a2fa66de2c9306d130ca431717f01d1e5
Reviewed-on: https://go-review.googlesource.com/c/tools/+/220281
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2020-02-24 23:06:35 +00:00
..
test internal/lsp: add module versions from "go list" to pkg.go.dev links 2020-02-19 19:55:21 +00:00
capabilities_test.go internal/lsp/debug: move all debug state onto the Instance 2020-02-24 22:50:47 +00:00
check.go internal/span,lsp: disambiguate URIs, DocumentURIs, and paths 2020-02-14 22:51:03 +00:00
cmd_test.go internal/lsp/lsprpc: add a handshake between forwarder and remote 2020-02-24 22:51:04 +00:00
cmd.go internal/lsp/lsprpc: automatically resolve and start the remote gopls 2020-02-24 22:51:55 +00:00
definition.go internal/lsp: check for file URIs on LSP requests 2020-02-14 22:51:26 +00:00
export_test.go internal/lsp: refactor query definition test to allow adding a new test 2019-03-18 20:06:54 +00:00
folding_range.go internal/span,lsp: disambiguate URIs, DocumentURIs, and paths 2020-02-14 22:51:03 +00:00
format.go internal/lsp: address staticcheck warnings 2019-10-04 02:16:23 +00:00
highlight.go internal/lsp: add control flow highlighting for functions 2019-12-02 19:01:20 +00:00
implementation.go internal/lsp: check for file URIs on LSP requests 2020-02-14 22:51:26 +00:00
imports.go internal/lsp: check for file URIs on LSP requests 2020-02-14 22:51:26 +00:00
info.go tools/internal/lsp/cmd: fix documentation 2019-12-30 18:10:14 +00:00
links.go internal/span,lsp: disambiguate URIs, DocumentURIs, and paths 2020-02-14 22:51:03 +00:00
prepare_rename.go internal/lsp: two trivial cleanups from CL 219077 2020-02-13 21:22:11 +00:00
query.go internal/lsp: improve link in documentation on hover 2019-12-12 22:39:21 +00:00
references.go internal/lsp: check for file URIs on LSP requests 2020-02-14 22:51:26 +00:00
rename.go internal/lsp: check for file URIs on LSP requests 2020-02-14 22:51:26 +00:00
serve_test.go internal/lsp/lsprpc: automatically resolve and start the remote gopls 2020-02-24 22:51:55 +00:00
serve.go internal/jsonrpc2: add an idle timeout for stream serving 2020-02-24 23:06:35 +00:00
signature.go internal/span,lsp: disambiguate URIs, DocumentURIs, and paths 2020-02-14 22:51:03 +00:00
suggested_fix.go internal/lsp: check for file URIs on LSP requests 2020-02-14 22:51:26 +00:00
symbols.go internal/span,lsp: disambiguate URIs, DocumentURIs, and paths 2020-02-14 22:51:03 +00:00