-
-
Save peterbourgon/ebd14ad8e7dd5051d6d1baa730532c64 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Trace - 10:17:52 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"23.167287ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go \"env\" \"GOMOD\", stderr: \u003c\u003c\u003e\u003e\n"} | |
[Info - 10:17:52 AM] 23.167287ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go "env" "GOMOD", stderr: <<>> | |
[Info - 10:17:52 AM] 34.62173ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go "list" "-e" "-json" "-compiled=true" "-test=true" "-export=false" "-deps=true" "-find=false" "--" "builtin", stderr: <<>> | |
[Trace - 10:17:52 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"34.62173ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go \"list\" \"-e\" \"-json\" \"-compiled=true\" \"-test=true\" \"-export=false\" \"-deps=true\" \"-find=false\" \"--\" \"builtin\", stderr: \u003c\u003c\u003e\u003e\n"} | |
[Trace - 10:17:52 AM] Received response 'initialize - (0)' in 0ms. | |
Params: {"capabilities":{"textDocumentSync":{"openClose":true,"change":2,"save":{}},"hoverProvider":true,"completionProvider":{"triggerCharacters":["."]},"signatureHelpProvider":{"triggerCharacters":["(",","]},"definitionProvider":true,"referencesProvider":true,"documentHighlightProvider":true,"documentSymbolProvider":true,"codeActionProvider":true,"documentFormattingProvider":true,"renameProvider":true,"documentLinkProvider":{},"typeDefinitionProvider":true,"workspace":{"workspaceFolders":{"supported":true,"changeNotifications":"workspace/didChangeWorkspaceFolders"}}},"custom":null} | |
[Trace - 10:17:52 AM] Sending notification 'initialize' in 37ms. | |
Params: {"processId":96472,"rootPath":"/Users/pbourgon/mod/REDACTED","rootUri":"file:///Users/pbourgon/mod/REDACTED","capabilities":{"workspace":{"applyEdit":true,"workspaceEdit":{"documentChanges":true},"didChangeConfiguration":{"dynamicRegistration":true},"didChangeWatchedFiles":{"dynamicRegistration":true},"symbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]}},"executeCommand":{"dynamicRegistration":true},"configuration":true,"workspaceFolders":true},"textDocument":{"publishDiagnostics":{"relatedInformation":true},"synchronization":{"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":true,"contextSupport":true,"completionItem":{"snippetSupport":true,"commitCharactersSupport":true,"documentationFormat":["markdown","plaintext"],"deprecatedSupport":true,"preselectSupport":true},"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]}},"hover":{"dynamicRegistration":true,"contentFormat":["markdown","plaintext"]},"signatureHelp":{"dynamicRegistration":true,"signatureInformation":{"documentationFormat":["markdown","plaintext"]}},"definition":{"dynamicRegistration":true},"references":{"dynamicRegistration":true},"documentHighlight":{"dynamicRegistration":true},"documentSymbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"hierarchicalDocumentSymbolSupport":true},"codeAction":{"dynamicRegistration":true,"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}}},"codeLens":{"dynamicRegistration":true},"formatting":{"dynamicRegistration":true},"rangeFormatting":{"dynamicRegistration":true},"onTypeFormatting":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true},"documentLink":{"dynamicRegistration":true},"typeDefinition":{"dynamicRegistration":true},"implementation":{"dynamicRegistration":true},"colorProvider":{"dynamicRegistration":true},"foldingRange":{"dynamicRegistration":true,"rangeLimit":5000,"lineFoldingOnly":true}}},"initializationOptions":{"funcSnippetEnabled":false,"gocodeCompletionEnabled":true},"trace":"off","workspaceFolders":[{"uri":"file:///Users/pbourgon/mod/REDACTED","name":"REDACTED"}]} | |
[Trace - 10:17:52 AM] Sending response 'client/registerCapability - (1)' in 0ms. | |
Params: {} | |
[Trace - 10:17:52 AM] Received notification 'client/registerCapability' in 2ms. | |
Params: {"registrations":[{"id":"workspace/didChangeConfiguration","method":"workspace/didChangeConfiguration"},{"id":"workspace/didChangeWorkspaceFolders","method":"workspace/didChangeWorkspaceFolders"}]} | |
[Trace - 10:17:52 AM] Sending response 'workspace/configuration - (2)' in 0ms. | |
Params: [{"usePlaceholders":true},null] | |
[Trace - 10:17:52 AM] Received notification 'workspace/configuration' in 3ms. | |
Params: {"items":[{"scopeUri":"file:///Users/pbourgon/mod/REDACTED","section":"gopls"},{"scopeUri":"file:///Users/pbourgon/mod/REDACTED","section":"REDACTED"}]} | |
[Info - 10:17:52 AM] 47.456056ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go "list" "-m" "-json" "all", stderr: <<>> | |
[Trace - 10:17:52 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"47.456056ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go \"list\" \"-m\" \"-json\" \"all\", stderr: \u003c\u003c\u003e\u003e\n"} | |
[Trace - 10:17:52 AM] Sending notification 'initialized' in 139ms. | |
Params: {} | |
[Trace - 10:17:52 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"Build info\n----------\ngolang.org/x/tools/gopls v0.1.3\n golang.org/x/tools/gopls@(devel)\n golang.org/x/sync@v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU=\n golang.org/x/tools@v0.0.0-20190723021737-8bb11ff117ca =\u003e ../\n golang.org/x/xerrors@v0.0.0-20190717185122-a985d3407aa7 h1:9zdDQZ7Thm29KFXgAX/+yaf3eVbP7djjWp/dXAppNCc=\n\nGo info\n-------\ngo version go1.12.7 darwin/amd64\n\nGOARCH=\"amd64\"\nGOBIN=\"\"\nGOCACHE=\"/Users/pbourgon/Library/Caches/go-build\"\nGOEXE=\"\"\nGOFLAGS=\"\"\nGOHOSTARCH=\"amd64\"\nGOHOSTOS=\"darwin\"\nGOOS=\"darwin\"\nGOPATH=\"/Users/pbourgon\"\nGOPROXY=\"\"\nGORACE=\"\"\nGOROOT=\"/usr/local/Cellar/go/1.12.7/libexec\"\nGOTMPDIR=\"\"\nGOTOOLDIR=\"/usr/local/Cellar/go/1.12.7/libexec/pkg/tool/darwin_amd64\"\nGCCGO=\"gccgo\"\nCC=\"clang\"\nCXX=\"clang++\"\nCGO_ENABLED=\"1\"\nGOMOD=\"/Users/pbourgon/mod/REDACTED/go.mod\"\nCGO_CFLAGS=\"-g -O2\"\nCGO_CPPFLAGS=\"\"\nCGO_CXXFLAGS=\"-g -O2\"\nCGO_FFLAGS=\"-g -O2\"\nCGO_LDFLAGS=\"-g -O2\"\nPKG_CONFIG=\"pkg-config\"\nGOGCCFLAGS=\"-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/m4/192hdv6n19j9x2v86k1r29rw0000gn/T/go-build912060474=/tmp/go-build -gno-record-gcc-switches -fno-common\"\n"} | |
[Info - 10:17:52 AM] Build info | |
---------- | |
golang.org/x/tools/gopls v0.1.3 | |
golang.org/x/tools/gopls@(devel) | |
golang.org/x/sync@v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU= | |
golang.org/x/tools@v0.0.0-20190723021737-8bb11ff117ca => ../ | |
golang.org/x/xerrors@v0.0.0-20190717185122-a985d3407aa7 h1:9zdDQZ7Thm29KFXgAX/+yaf3eVbP7djjWp/dXAppNCc= | |
Go info | |
------- | |
go version go1.12.7 darwin/amd64 | |
GOARCH="amd64" | |
GOBIN="" | |
GOCACHE="/Users/pbourgon/Library/Caches/go-build" | |
GOEXE="" | |
GOFLAGS="" | |
GOHOSTARCH="amd64" | |
GOHOSTOS="darwin" | |
GOOS="darwin" | |
GOPATH="/Users/pbourgon" | |
GOPROXY="" | |
GORACE="" | |
GOROOT="/usr/local/Cellar/go/1.12.7/libexec" | |
GOTMPDIR="" | |
GOTOOLDIR="/usr/local/Cellar/go/1.12.7/libexec/pkg/tool/darwin_amd64" | |
GCCGO="gccgo" | |
CC="clang" | |
CXX="clang++" | |
CGO_ENABLED="1" | |
GOMOD="/Users/pbourgon/mod/REDACTED/go.mod" | |
CGO_CFLAGS="-g -O2" | |
CGO_CPPFLAGS="" | |
CGO_CXXFLAGS="-g -O2" | |
CGO_FFLAGS="-g -O2" | |
CGO_LDFLAGS="-g -O2" | |
PKG_CONFIG="pkg-config" | |
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/m4/192hdv6n19j9x2v86k1r29rw0000gn/T/go-build912060474=/tmp/go-build -gno-record-gcc-switches -fno-common" | |
[Trace - 10:17:52 AM] Sending notification 'textDocument/didOpen' in 139ms. | |
Params: {"textDocument":{"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/tls.go","languageId":"go","version":1,"text":"package api\n\nimport (\n\t\"context\"\n\t\"crypto/tls\"\n\t\"io/ioutil\"\n\t\"log\"\n\t\"net\"\n\t\"net/http\"\n\t\"time\"\n\n\t\"github.com/fastly/fst-go/tlscfg\"\n\t\"github.com/fastly/REDACTED/pkg/errors\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\n// KeyPair combines a cert and a key.\ntype KeyPair struct {\n\tCert []byte\n\tKey []byte\n}\n\n// NewTLSServer returns an http.Server properly configured for mutual TLS auth.\n// Because the server can present multiple TLS key pairs, the ListenAndServe\n// helper will not work; callers should call server.Serve with the provided\n// net.Listener. Remember to clean up both the Server and the Listener.\nfunc NewTLSServer(netw, addr string, handler http.Handler, present KeyPair, accept []KeyPair) (*http.Server, net.Listener, error) {\n\topts := []tlscfg.Opt{\n\t\ttlscfg.WithKeyPair(present.Cert, present.Key),\n\t}\n\tfor _, keyPair := range accept {\n\t\topts = append(opts, tlscfg.WithCA(keyPair.Cert, tlscfg.ForServer))\n\t}\n\n\tcfg, err := tlscfg.New(opts...)\n\tif err != nil {\n\t\treturn nil, nil, errors.Wrap(err, \"error constructing TLS config for server\")\n\t}\n\n\tln, err := tls.Listen(netw, addr, cfg)\n\tif err != nil {\n\t\treturn nil, nil, errors.Wrap(err, \"error binding TLS listener\")\n\t}\n\n\treturn &http.Server{\n\t\tHandler: handler,\n\t\tTLSConfig: cfg,\n\t\tReadHeaderTimeout: 5 * time.Second,\n\t\tWriteTimeout: 10 * time.Second,\n\t\tIdleTimeout: 120 * time.Second,\n\t\tErrorLog: log.New(ioutil.Discard, \"\", 0),\n\t}, ln, nil\n}\n\n// NewTLSClient returns an http.Client properly configured for mutual TLS auth.\n// The transport will have MaxConnsPerHost and MaxIdleConnsPerHost set to\n// maxConns.\nfunc NewTLSClient(present KeyPair, accept []KeyPair, maxConns int, dials prometheus.Counter) (*http.Client, error) {\n\topts := []tlscfg.Opt{\n\t\ttlscfg.WithKeyPair(present.Cert, present.Key),\n\t}\n\tfor _, keyPair := range accept {\n\t\topts = append(opts, tlscfg.WithCA(keyPair.Cert, tlscfg.ForClient))\n\t}\n\n\tcfg, err := tlscfg.New(opts...)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"error constructing TLS config for client\")\n\t}\n\n\treturn &http.Client{\n\t\tTransport: &http.Transport{\n\t\t\tTLSClientConfig: cfg,\n\t\t\tMaxConnsPerHost: maxConns,\n\t\t\tMaxIdleConnsPerHost: maxConns,\n\t\t\tDialContext: func(ctx context.Context, netw, addr string) (net.Conn, error) {\n\t\t\t\tdials.Inc()\n\t\t\t\treturn zeroDialer.DialContext(ctx, netw, addr)\n\t\t\t},\n\t\t},\n\t}, nil\n}\n\n// NopDials may be passed to NewHTTPClient when dials don't need to be\n// tracked, in e.g. tests.\nvar NopDials = prometheus.NewCounter(prometheus.CounterOpts{\n\tName: \"nop_dials\",\n\tHelp: \"No-op dials.\",\n})\n\nvar zeroDialer = net.Dialer{\n\t// Timeout: time.Second // experimental\n}\n"}} | |
[Info - 10:17:52 AM] 19.312766ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go "env" "GOMOD", stderr: <<>> | |
[Trace - 10:17:52 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"19.312766ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go \"env\" \"GOMOD\", stderr: \u003c\u003c\u003e\u003e\n"} | |
[Info - 10:17:52 AM] 29.23561ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go "list" "-m" "-json" "all", stderr: <<>> | |
[Trace - 10:17:52 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"29.23561ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go \"list\" \"-m\" \"-json\" \"all\", stderr: \u003c\u003c\u003e\u003e\n"} | |
[Info - 10:17:53 AM] 369.281286ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go "list" "-e" "-json" "-compiled=true" "-test=true" "-export=false" "-deps=true" "-find=false" "--" "/Users/pbourgon/mod/REDACTED/pkg/api", stderr: <<>> | |
[Trace - 10:17:53 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"369.281286ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go \"list\" \"-e\" \"-json\" \"-compiled=true\" \"-test=true\" \"-export=false\" \"-deps=true\" \"-find=false\" \"--\" \"/Users/pbourgon/mod/REDACTED/pkg/api\", stderr: \u003c\u003c\u003e\u003e\n"} | |
[Info - 10:17:53 AM] go/packages.Load | |
packages = 2 | |
[Trace - 10:17:53 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"go/packages.Load\n\tpackages = 2"} | |
[Trace - 10:17:53 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"go/packages.Load\n\tpackage = github.com/fastly/REDACTED/pkg/api\n\tfiles = [/Users/pbourgon/mod/REDACTED/pkg/api/debug.go /Users/pbourgon/mod/REDACTED/pkg/api/doc.go /Users/pbourgon/mod/REDACTED/pkg/api/internal.go /Users/pbourgon/mod/REDACTED/pkg/api/middlewares.go /Users/pbourgon/mod/REDACTED/pkg/api/public.go /Users/pbourgon/mod/REDACTED/pkg/api/tls.go /Users/pbourgon/mod/REDACTED/pkg/api/util.go]"} | |
[Info - 10:17:53 AM] go/packages.Load | |
package = github.com/fastly/REDACTED/pkg/api | |
files = [/Users/pbourgon/mod/REDACTED/pkg/api/debug.go /Users/pbourgon/mod/REDACTED/pkg/api/doc.go /Users/pbourgon/mod/REDACTED/pkg/api/internal.go /Users/pbourgon/mod/REDACTED/pkg/api/middlewares.go /Users/pbourgon/mod/REDACTED/pkg/api/public.go /Users/pbourgon/mod/REDACTED/pkg/api/tls.go /Users/pbourgon/mod/REDACTED/pkg/api/util.go] | |
[Info - 10:17:53 AM] go/packages.Load | |
package = github.com/fastly/REDACTED/pkg/api | |
files = [/Users/pbourgon/mod/REDACTED/pkg/api/debug.go /Users/pbourgon/mod/REDACTED/pkg/api/doc.go /Users/pbourgon/mod/REDACTED/pkg/api/internal.go /Users/pbourgon/mod/REDACTED/pkg/api/middlewares.go /Users/pbourgon/mod/REDACTED/pkg/api/public.go /Users/pbourgon/mod/REDACTED/pkg/api/tls.go /Users/pbourgon/mod/REDACTED/pkg/api/util.go /Users/pbourgon/mod/REDACTED/pkg/api/tls_test.go] | |
[Trace - 10:17:53 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"go/packages.Load\n\tpackage = github.com/fastly/REDACTED/pkg/api\n\tfiles = [/Users/pbourgon/mod/REDACTED/pkg/api/debug.go /Users/pbourgon/mod/REDACTED/pkg/api/doc.go /Users/pbourgon/mod/REDACTED/pkg/api/internal.go /Users/pbourgon/mod/REDACTED/pkg/api/middlewares.go /Users/pbourgon/mod/REDACTED/pkg/api/public.go /Users/pbourgon/mod/REDACTED/pkg/api/tls.go /Users/pbourgon/mod/REDACTED/pkg/api/util.go /Users/pbourgon/mod/REDACTED/pkg/api/tls_test.go]"} | |
[Info - 10:17:53 AM] 16.974871ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go "env" "GOMOD", stderr: <<>> | |
[Trace - 10:17:53 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"16.974871ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go \"env\" \"GOMOD\", stderr: \u003c\u003c\u003e\u003e\n"} | |
[Info - 10:17:53 AM] 25.210192ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go "list" "-m" "-json" "all", stderr: <<>> | |
[Trace - 10:17:53 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"25.210192ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go \"list\" \"-m\" \"-json\" \"all\", stderr: \u003c\u003c\u003e\u003e\n"} | |
[Info - 10:17:53 AM] 206.615456ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go "list" "-e" "-json" "-compiled=true" "-test=true" "-export=false" "-deps=true" "-find=false" "--" "/Users/pbourgon/mod/REDACTED/pkg/api", stderr: <<>> | |
[Trace - 10:17:53 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"206.615456ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go \"list\" \"-e\" \"-json\" \"-compiled=true\" \"-test=true\" \"-export=false\" \"-deps=true\" \"-find=false\" \"--\" \"/Users/pbourgon/mod/REDACTED/pkg/api\", stderr: \u003c\u003c\u003e\u003e\n"} | |
[Info - 10:17:53 AM] go/packages.Load | |
package = github.com/fastly/REDACTED/pkg/api | |
files = [/Users/pbourgon/mod/REDACTED/pkg/api/debug.go /Users/pbourgon/mod/REDACTED/pkg/api/doc.go /Users/pbourgon/mod/REDACTED/pkg/api/internal.go /Users/pbourgon/mod/REDACTED/pkg/api/middlewares.go /Users/pbourgon/mod/REDACTED/pkg/api/public.go /Users/pbourgon/mod/REDACTED/pkg/api/tls.go /Users/pbourgon/mod/REDACTED/pkg/api/util.go /Users/pbourgon/mod/REDACTED/pkg/api/tls_test.go] | |
[Trace - 10:17:53 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"go/packages.Load\n\tpackages = 2"} | |
[Trace - 10:17:53 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"go/packages.Load\n\tpackage = github.com/fastly/REDACTED/pkg/api\n\tfiles = [/Users/pbourgon/mod/REDACTED/pkg/api/debug.go /Users/pbourgon/mod/REDACTED/pkg/api/doc.go /Users/pbourgon/mod/REDACTED/pkg/api/internal.go /Users/pbourgon/mod/REDACTED/pkg/api/middlewares.go /Users/pbourgon/mod/REDACTED/pkg/api/public.go /Users/pbourgon/mod/REDACTED/pkg/api/tls.go /Users/pbourgon/mod/REDACTED/pkg/api/util.go /Users/pbourgon/mod/REDACTED/pkg/api/tls_test.go]"} | |
[Trace - 10:17:53 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"go/packages.Load\n\tpackage = github.com/fastly/REDACTED/pkg/api\n\tfiles = [/Users/pbourgon/mod/REDACTED/pkg/api/debug.go /Users/pbourgon/mod/REDACTED/pkg/api/doc.go /Users/pbourgon/mod/REDACTED/pkg/api/internal.go /Users/pbourgon/mod/REDACTED/pkg/api/middlewares.go /Users/pbourgon/mod/REDACTED/pkg/api/public.go /Users/pbourgon/mod/REDACTED/pkg/api/tls.go /Users/pbourgon/mod/REDACTED/pkg/api/util.go]"} | |
[Info - 10:17:53 AM] go/packages.Load | |
packages = 2 | |
[Info - 10:17:53 AM] go/packages.Load | |
package = github.com/fastly/REDACTED/pkg/api | |
files = [/Users/pbourgon/mod/REDACTED/pkg/api/debug.go /Users/pbourgon/mod/REDACTED/pkg/api/doc.go /Users/pbourgon/mod/REDACTED/pkg/api/internal.go /Users/pbourgon/mod/REDACTED/pkg/api/middlewares.go /Users/pbourgon/mod/REDACTED/pkg/api/public.go /Users/pbourgon/mod/REDACTED/pkg/api/tls.go /Users/pbourgon/mod/REDACTED/pkg/api/util.go] | |
[Trace - 10:17:53 AM] Received response 'textDocument/documentSymbol - (1)' in 0ms. | |
Params: [{"name":"KeyPair","detail":"struct{...}","kind":23,"range":{"start":{"line":17,"character":5},"end":{"line":20,"character":1}},"selectionRange":{"start":{"line":17,"character":5},"end":{"line":17,"character":12}},"children":[{"name":"Cert","detail":"[]byte","kind":8,"range":{"start":{"line":18,"character":1},"end":{"line":18,"character":12}},"selectionRange":{"start":{"line":18,"character":1},"end":{"line":18,"character":5}}},{"name":"Key","detail":"[]byte","kind":8,"range":{"start":{"line":19,"character":1},"end":{"line":19,"character":12}},"selectionRange":{"start":{"line":19,"character":1},"end":{"line":19,"character":4}}}]},{"name":"NewTLSServer","detail":"(netw string, addr string, handler http.Handler, present KeyPair, accept []KeyPair)","kind":12,"range":{"start":{"line":26,"character":0},"end":{"line":52,"character":1}},"selectionRange":{"start":{"line":26,"character":5},"end":{"line":26,"character":17}}},{"name":"NewTLSClient","detail":"(present KeyPair, accept []KeyPair, maxConns int, dials prometheus.Counter)","kind":12,"range":{"start":{"line":57,"character":0},"end":{"line":81,"character":1}},"selectionRange":{"start":{"line":57,"character":5},"end":{"line":57,"character":17}}},{"name":"NopDials","detail":"prometheus.Counter","kind":13,"range":{"start":{"line":85,"character":0},"end":{"line":88,"character":2}},"selectionRange":{"start":{"line":85,"character":4},"end":{"line":85,"character":12}}},{"name":"zeroDialer","detail":"net.Dialer","kind":13,"range":{"start":{"line":90,"character":0},"end":{"line":92,"character":1}},"selectionRange":{"start":{"line":90,"character":4},"end":{"line":90,"character":14}}}] | |
[Trace - 10:17:53 AM] Sending notification 'textDocument/documentSymbol' in 1148ms. | |
Params: {"textDocument":{"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/tls.go"}} | |
[Trace - 10:17:53 AM] Received response 'textDocument/codeAction - (2)' in 0ms. | |
Params: [{"title":"Organize Imports","kind":"source.organizeImports","edit":{"changes":{"file:///Users/pbourgon/mod/REDACTED/pkg/api/tls.go":[]}}}] | |
[Trace - 10:17:53 AM] Sending notification 'textDocument/codeAction' in 1199ms. | |
Params: {"textDocument":{"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/tls.go"},"range":{"start":{"line":70,"character":21},"end":{"line":70,"character":21}},"context":{"diagnostics":[]}} | |
[Trace - 10:17:53 AM] Received response 'textDocument/documentLink - (3)' in 0ms. | |
Params: [{"range":{"start":{"line":3,"character":1},"end":{"line":3,"character":10}},"target":"https://godoc.org/context"},{"range":{"start":{"line":4,"character":1},"end":{"line":4,"character":13}},"target":"https://godoc.org/crypto/tls"},{"range":{"start":{"line":5,"character":1},"end":{"line":5,"character":12}},"target":"https://godoc.org/io/ioutil"},{"range":{"start":{"line":6,"character":1},"end":{"line":6,"character":6}},"target":"https://godoc.org/log"},{"range":{"start":{"line":7,"character":1},"end":{"line":7,"character":6}},"target":"https://godoc.org/net"},{"range":{"start":{"line":8,"character":1},"end":{"line":8,"character":11}},"target":"https://godoc.org/net/http"},{"range":{"start":{"line":9,"character":1},"end":{"line":9,"character":7}},"target":"https://godoc.org/time"},{"range":{"start":{"line":11,"character":1},"end":{"line":11,"character":34}},"target":"https://godoc.org/github.com/fastly/fst-go/tlscfg"},{"range":{"start":{"line":12,"character":1},"end":{"line":12,"character":38}},"target":"https://godoc.org/github.com/fastly/REDACTED/pkg/errors"},{"range":{"start":{"line":13,"character":1},"end":{"line":13,"character":49}},"target":"https://godoc.org/github.com/prometheus/client_golang/prometheus"}] | |
[Trace - 10:17:53 AM] Sending notification 'textDocument/documentLink' in 1199ms. | |
Params: {"textDocument":{"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/tls.go"}} | |
[Trace - 10:17:53 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/util.go","diagnostics":[]} | |
[Trace - 10:17:53 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/debug.go","diagnostics":[]} | |
[Trace - 10:17:53 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/doc.go","diagnostics":[]} | |
[Trace - 10:17:53 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/internal.go","diagnostics":[]} | |
[Trace - 10:17:53 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/middlewares.go","diagnostics":[]} | |
[Trace - 10:17:53 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/public.go","diagnostics":[]} | |
[Trace - 10:17:53 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/tls.go","diagnostics":[]} | |
[Trace - 10:18:26 AM] Sending notification 'textDocument/didOpen' in 1ms. | |
Params: {"textDocument":{"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/ring/node.go","languageId":"go","version":1,"text":"package ring\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"sort\"\n\t\"strings\"\n\n\t\"github.com/fastly/REDACTED/pkg/errors\"\n\t\"github.com/fastly/REDACTED/pkg/object\"\n\t\"github.com/fastly/REDACTED/pkg/replica\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\n// ErrNoNodesFound indicates a configuration error in the consistent hash ring.\nvar ErrNoNodesFound = errors.New(\"no ring nodes found for object; configuration error\")\n\n// ConsistencyMode dictates how the ring layer scatters requests to matching\n// nodes, gathers responses, and deals with the resulting data.\ntype ConsistencyMode uint8\n\n// The consistency modes map to different behavior in the Exec method. We always\n// broadcast the request to every matching peer, and the consistency modes\n// determine how to handle the responses.\n//\n// Merge responses Yield first response\n// +---------------------+----------------------+\n// Any error is fatal | ConsistencyModeSafe | ConsistencyModeYOLO |\n// +---------------------+----------------------+\n// Only ALL errors is fatal | ConsistencyModeBest | ConsistencyModeFast |\n// +---------------------+----------------------+\n//\nconst (\n\tConsistencyModeSafe ConsistencyMode = iota\n\tConsistencyModeFast\n\tConsistencyModeBest\n\tConsistencyModeYOLO\n)\n\n// Peer models the internal APIs of a replica.\n// It's a consumer contract for a ring node.\ntype Peer interface {\n\tDebug(ctx context.Context, op interface{}) (object.Raw, error)\n\tExec(ctx context.Context, realm, id string, op interface{}) (object.Raw, error)\n\tSync(context.Context, map[object.RealmIDTag]replica.SyncRequest) (map[object.RealmIDTag]replica.SyncResponse, error)\n}\n\nvar (\n\t// NopReadRepairs may be passed to NewNode when read repairs don't need to\n\t// be tracked, in e.g. tests.\n\tNopReadRepairs = prometheus.NewCounterVec(prometheus.CounterOpts{\n\t\tName: \"nop_read_repairs\",\n\t\tHelp: \"No-op read repairs.\",\n\t}, []string{\"target\", \"success\"})\n)\n\n// Node in a consistent hash ring.\n// Implements the low-level object APIs.\ntype Node struct {\n\tpeers map[string]Peer\n\tring *ring\n\treadRepairs *prometheus.CounterVec\n}\n\n// NewNode returns a member of a consistent hash ring.\n// All peers should be represented in the peers map.\nfunc NewNode(peers map[string]Peer, replicationFactor int, readRepairs *prometheus.CounterVec) *Node {\n\tids := make([]string, 0, len(peers))\n\tfor k := range peers {\n\t\tids = append(ids, k)\n\t}\n\tsort.Strings(ids)\n\treturn &Node{\n\t\tpeers: peers,\n\t\tring: newRing(replicationFactor, ids...),\n\t\treadRepairs: readRepairs,\n\t}\n}\n\nfunc keyFor(realm, id string) string {\n\treturn realm + \"·\" + id\n}\n\nfunc (n *Node) mustGetPeer(node string) Peer {\n\tpeer, ok := n.peers[node]\n\tif !ok {\n\t\tpanic(fmt.Sprintf(\"programmer error: peer not found for node %q\", node))\n\t}\n\treturn peer\n}\n\n// Debug is like Exec but has no realm or ID, broadcasting the op to all nodes\n// in the ring. Fails fast, aborting on any error. Merge and return all\n// responses.\nfunc (n *Node) Debug(ctx context.Context, op interface{}) (object.Raw, error) {\n\tvar (\n\t\tobjs = make(chan object.Raw, len(n.peers))\n\t\terrs = make(chan error, len(n.peers))\n\t)\n\tfor _, peer := range n.peers {\n\t\tgo func(p Peer) {\n\t\t\tobj, err := p.Debug(ctx, op)\n\t\t\tif err == nil {\n\t\t\t\tobjs <- obj\n\t\t\t} else {\n\t\t\t\terrs <- err\n\t\t\t}\n\t\t}(peer)\n\t}\n\n\tvar (\n\t\tfirst bool\n\t\tresp object.Raw\n\t)\n\tfor i := 0; i < len(n.peers); i++ {\n\t\tselect {\n\t\tcase err := <-errs:\n\t\t\treturn object.Raw{}, err\n\t\tcase obj := <-objs:\n\t\t\tif !first {\n\t\t\t\tresp = obj\n\t\t\t} else {\n\t\t\t\tif err := resp.Merge(obj); err != nil {\n\t\t\t\t\treturn object.Raw{}, err\n\t\t\t\t}\n\t\t\t}\n\t\t\tfirst = true\n\t\t}\n\t}\n\n\treturn resp, nil\n}\n\n// ExecMode scatters the request to matching peers, and gathers responses\n// according to the provided consistency mode.\nfunc (n *Node) ExecMode(ctx context.Context, realm, id string, op interface{}, mode ConsistencyMode) (object.Raw, error) {\n\t// Figure out which individual nodes should receive the request.\n\tnodes := n.ring.nodes(keyFor(realm, id))\n\tif len(nodes) <= 0 {\n\t\treturn object.Raw{}, ErrNoNodesFound\n\t}\n\n\t// Define a response tuple.\n\ttype response struct {\n\t\tidx int\n\t\tobj object.Raw\n\t\terr error\n\t}\n\n\t// Scatter requests to nodes.\n\tresponses := make(chan response, len(nodes))\n\tfor i, node := range nodes {\n\t\tgo func(idx int, p Peer) {\n\t\t\tobj, err := p.Exec(ctx, realm, id, op)\n\t\t\tresponses <- response{idx, obj, err}\n\t\t}(i, n.mustGetPeer(node))\n\t}\n\n\t// We will return to the caller whichever object.Raw or error arrives first,\n\t// on either of these channels. We overprovision their buffers so that the\n\t// gathering goroutine may have simpler logic.\n\t//\n\t// Observe that we provide a buffer of len(nodes)+1 to accommodate failFast\n\t// and returnFast modes (which may trigger up to len(nodes) chan sends on\n\t// either channel) and the eventual merged object (another returnObj send)\n\t// or aggregate error (another returnErr send).\n\tvar (\n\t\treturnObj = make(chan object.Raw, len(nodes)+1)\n\t\treturnErr = make(chan error, len(nodes)+1)\n\t)\n\n\t// Launch a goroutine to gather responses from the scatter phase, and yields\n\t// results on the return channels. Depending on the consistency mode, we'll\n\t// have different behavior. This is a little bit tricky, read it carefully.\n\tgo func() {\n\t\t// Some consistency modes should \"fail fast\" and yield the first\n\t\t// received error. Some consistency modes should \"succeed fast\" and\n\t\t// yield the first successful object.\n\t\tvar (\n\t\t\tfailFast = mode == ConsistencyModeSafe || mode == ConsistencyModeYOLO\n\t\t\tsucceedFast = mode == ConsistencyModeYOLO || mode == ConsistencyModeFast\n\t\t)\n\n\t\t// Collect responses into slices of objects and errors, whose indexes\n\t\t// correspond to the originating node (peer). In failFast and succeedFast\n\t\t// modes, we may yield responses to the caller, via the parent\n\t\t// goroutine, at this stage.\n\t\tvar (\n\t\t\tobjs = make([]object.Raw, len(nodes))\n\t\t\terrs = make([]error, len(nodes))\n\t\t)\n\t\tfor range nodes {\n\t\t\tr := <-responses\n\t\t\tswitch {\n\t\t\tcase r.err != nil && failFast:\n\t\t\t\terrs[r.idx] = r.err\n\t\t\t\treturnErr <- r.err // yield first error\n\t\t\tcase r.err != nil && !failFast:\n\t\t\t\terrs[r.idx] = r.err\n\t\t\tcase r.err == nil && succeedFast:\n\t\t\t\tobjs[r.idx] = r.obj\n\t\t\t\treturnObj <- r.obj // yield first response\n\t\t\tcase r.err == nil && !succeedFast:\n\t\t\t\tobjs[r.idx] = r.obj\n\t\t\t}\n\t\t}\n\n\t\t// At this stage, we should try to merge successful response objects\n\t\t// together, yield an object, and issue any necessary read repairs.\n\t\tvar (\n\t\t\tinitial bool // have we received the first successful response yet?\n\t\t\tfinal object.Raw // the aggregate object we're building\n\t\t\tterminal []error // any errors received from individual nodes\n\t\t)\n\t\tfor i := range nodes {\n\t\t\tswitch {\n\t\t\tcase errs[i] == nil && !initial:\n\t\t\t\tfinal, initial = objs[i], true\n\t\t\tcase errs[i] == nil && initial:\n\t\t\t\tfinal.Merge(objs[i])\n\t\t\tcase errs[i] != nil:\n\t\t\t\tterminal = append(terminal, errs[i])\n\t\t\t}\n\t\t}\n\n\t\t// If we collected 100% errors, there's no point checking the responses,\n\t\t// and we have nothing we can possibly use to calculate read repair.\n\t\t// Yield an aggregate error to the caller, and give up.\n\t\tif len(terminal) >= len(nodes) {\n\t\t\treturnErr <- aggregate(terminal)\n\t\t\treturn\n\t\t}\n\n\t\t// We got at least one good response. Yield the object to the caller.\n\t\treturnObj <- final\n\n\t\t// At this point the parent goroutine has definitely returned a result\n\t\t// to the caller, so we're free to stick around to calculate and issue\n\t\t// any read repairs, sequentially and synchronously from this goroutine,\n\t\t// without affecting anything.\n\t\tfor i, candidate := range objs {\n\t\t\tif !candidate.Equals(final) {\n\t\t\t\tsuccess := readRepair(context.Background(), n.mustGetPeer(nodes[i]), final)\n\t\t\t\tn.readRepairs.WithLabelValues(nodes[i], fmt.Sprint(success)).Inc()\n\t\t\t}\n\t\t}\n\t}()\n\n\tselect {\n\tcase obj := <-returnObj:\n\t\treturn obj, nil\n\tcase err := <-returnErr:\n\t\treturn object.Raw{}, err\n\t}\n}\n\n// Sync de-muxes the incoming requests to the relevant peers on the ring, and\n// re-aggregates the responses before returning to the caller. Sync is not\n// affected by the consistency mode.\nfunc (n *Node) Sync(ctx context.Context, incoming map[object.RealmIDTag]replica.SyncRequest) (outgoing map[object.RealmIDTag]replica.SyncResponse, err error) {\n\t// De-mux incoming requests to the nodes that should process them.\n\tbyNode := map[string][]object.RealmIDTag{}\n\tfor rit := range incoming {\n\t\tfor _, node := range n.ring.nodes(keyFor(rit.Realm, rit.ID)) {\n\t\t\tbyNode[node] = append(byNode[node], rit)\n\t\t}\n\t}\n\n\t// Scatter individual Sync requests to each node.\n\tvar (\n\t\tresponses = make(chan map[object.RealmIDTag]replica.SyncResponse, len(byNode))\n\t\terrs = make(chan error, len(byNode))\n\t)\n\tfor node, rits := range byNode {\n\t\tnodeIncoming := make(map[object.RealmIDTag]replica.SyncRequest, len(rits))\n\t\tfor _, rit := range rits {\n\t\t\tnodeIncoming[rit] = incoming[rit]\n\t\t}\n\t\tgo func(p Peer) {\n\t\t\tif response, err := p.Sync(ctx, nodeIncoming); err == nil {\n\t\t\t\tresponses <- response\n\t\t\t} else {\n\t\t\t\terrs <- err\n\t\t\t}\n\t\t}(n.mustGetPeer(node))\n\t}\n\n\t// Merge all results.\n\toutgoing = map[object.RealmIDTag]replica.SyncResponse{}\n\tfor i := 0; i < len(byNode); i++ {\n\t\tselect {\n\t\tcase err := <-errs:\n\t\t\treturn outgoing, errors.Wrap(err, \"error from concrete replica at ring layer\") // TODO(pb): fail fast, but is it best?\n\n\t\tcase response := <-responses:\n\t\t\tfor rit, resp := range response {\n\t\t\t\tvar (\n\t\t\t\t\texisting, found = outgoing[rit]\n\t\t\t\t\trequest, ok = incoming[rit]\n\t\t\t\t)\n\t\t\t\tif !ok {\n\t\t\t\t\tpanic(\"programmer error: no corresponding request found at ring layer\")\n\t\t\t\t}\n\t\t\t\tif found {\n\t\t\t\t\tif err := mergeResponses(&existing, resp, request); err != nil {\n\t\t\t\t\t\treturn outgoing, errors.Wrap(err, \"error merging objects at ring layer\")\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\texisting = resp\n\t\t\t\t}\n\t\t\t\toutgoing[rit] = existing\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return results.\n\treturn outgoing, nil\n}\n\n//\n//\n//\n\nfunc mergeResponses(dst *replica.SyncResponse, src replica.SyncResponse, req replica.SyncRequest) error {\n\tif dst.Obj.Realm != src.Obj.Realm {\n\t\treturn errors.New(\"mismatched realms\")\n\t}\n\n\tif dst.Obj.ID != src.Obj.ID {\n\t\treturn errors.New(\"mismatched IDs\")\n\t}\n\n\tif req.Read {\n\t\tif !dst.Found && src.Found {\n\t\t\tdst.Obj = src.Obj\n\t\t}\n\t\treturn nil\n\t}\n\n\tif req.Write {\n\t\treturn dst.Obj.Merge(src.Obj)\n\t}\n\n\tpanic(\"programmer error: unreachable\")\n}\n\nfunc mergeUniqueValues(existing, incoming [][]byte) [][]byte {\nouter:\n\tfor _, a := range incoming {\n\t\tfor _, cmp := range existing {\n\t\t\tif bytes.Equal(a, cmp) {\n\t\t\t\tcontinue outer\n\t\t\t}\n\t\t}\n\t\texisting = append(existing, a)\n\t}\n\treturn existing\n}\n\nfunc readRepair(ctx context.Context, p Peer, obj object.Raw) (success bool) {\n\t_, err := p.Sync(ctx, map[object.RealmIDTag]replica.SyncRequest{\n\t\tobject.RealmIDTag{\n\t\t\tRealm: obj.Realm,\n\t\t\tID: obj.ID,\n\t\t\tTag: obj.Tag,\n\t\t}: replica.SyncRequest{\n\t\t\tObj: obj,\n\t\t\tWrite: true,\n\t\t},\n\t})\n\treturn err == nil\n}\n\nfunc aggregate(individual []error) error {\n\tvar (\n\t\tcodes = map[int]int{}\n\t\tstrs = map[string]int{}\n\t)\n\tfor _, err := range individual {\n\t\tcode := http.StatusInternalServerError\n\t\tif perr, ok := err.(errors.Error); ok {\n\t\t\tcode = perr.StatusCode\n\t\t}\n\t\tstrs[err.Error()]++\n\t\tcodes[code]++\n\t}\n\n\tcode := http.StatusInternalServerError\n\tif len(codes) == 1 {\n\t\tfor c := range codes {\n\t\t\tcode = c\n\t\t}\n\t}\n\treturn errors.NewCode(code, concat(strs))\n}\n\nfunc concat(strs map[string]int) string {\n\tif len(strs) <= 0 {\n\t\treturn \"(no errors)\"\n\t}\n\n\ta := make([]string, 0, len(strs))\n\tfor str, count := range strs {\n\t\tif count == 1 {\n\t\t\ta = append(a, str)\n\t\t} else {\n\t\t\ta = append(a, fmt.Sprintf(\"%s (%d)\", str, count))\n\t\t}\n\t}\n\n\tsort.Strings(a)\n\treturn strings.Join(a, \"; \")\n}\n"}} | |
[Info - 10:18:26 AM] 39.739411ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go "env" "GOMOD", stderr: <<>> | |
[Trace - 10:18:26 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"39.739411ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go \"env\" \"GOMOD\", stderr: \u003c\u003c\u003e\u003e\n"} | |
[Info - 10:18:26 AM] 44.545467ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go "list" "-m" "-json" "all", stderr: <<>> | |
[Trace - 10:18:26 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"44.545467ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go \"list\" \"-m\" \"-json\" \"all\", stderr: \u003c\u003c\u003e\u003e\n"} | |
[Info - 10:18:26 AM] 252.3393ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go "list" "-e" "-json" "-compiled=true" "-test=true" "-export=false" "-deps=true" "-find=false" "--" "/Users/pbourgon/mod/REDACTED/pkg/ring", stderr: <<>> | |
[Trace - 10:18:26 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"252.3393ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go \"list\" \"-e\" \"-json\" \"-compiled=true\" \"-test=true\" \"-export=false\" \"-deps=true\" \"-find=false\" \"--\" \"/Users/pbourgon/mod/REDACTED/pkg/ring\", stderr: \u003c\u003c\u003e\u003e\n"} | |
[Info - 10:18:26 AM] go/packages.Load | |
package = github.com/fastly/REDACTED/pkg/ring | |
files = [/Users/pbourgon/mod/REDACTED/pkg/ring/doc.go /Users/pbourgon/mod/REDACTED/pkg/ring/node.go /Users/pbourgon/mod/REDACTED/pkg/ring/ring.go /Users/pbourgon/mod/REDACTED/pkg/ring/node_test.go /Users/pbourgon/mod/REDACTED/pkg/ring/ring_test.go] | |
[Trace - 10:18:26 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"go/packages.Load\n\tpackage = github.com/fastly/REDACTED/pkg/ring\n\tfiles = [/Users/pbourgon/mod/REDACTED/pkg/ring/doc.go /Users/pbourgon/mod/REDACTED/pkg/ring/node.go /Users/pbourgon/mod/REDACTED/pkg/ring/ring.go /Users/pbourgon/mod/REDACTED/pkg/ring/node_test.go /Users/pbourgon/mod/REDACTED/pkg/ring/ring_test.go]"} | |
[Trace - 10:18:26 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"go/packages.Load\n\tpackage = github.com/fastly/REDACTED/pkg/ring\n\tfiles = [/Users/pbourgon/mod/REDACTED/pkg/ring/doc.go /Users/pbourgon/mod/REDACTED/pkg/ring/node.go /Users/pbourgon/mod/REDACTED/pkg/ring/ring.go]"} | |
[Trace - 10:18:26 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"go/packages.Load\n\tpackages = 2"} | |
[Info - 10:18:26 AM] go/packages.Load | |
package = github.com/fastly/REDACTED/pkg/ring | |
files = [/Users/pbourgon/mod/REDACTED/pkg/ring/doc.go /Users/pbourgon/mod/REDACTED/pkg/ring/node.go /Users/pbourgon/mod/REDACTED/pkg/ring/ring.go] | |
[Info - 10:18:26 AM] go/packages.Load | |
packages = 2 | |
[Trace - 10:18:26 AM] Received response 'textDocument/documentLink - (4)' in 0ms. | |
Params: [{"range":{"start":{"line":3,"character":1},"end":{"line":3,"character":8}},"target":"https://godoc.org/bytes"},{"range":{"start":{"line":4,"character":1},"end":{"line":4,"character":10}},"target":"https://godoc.org/context"},{"range":{"start":{"line":5,"character":1},"end":{"line":5,"character":6}},"target":"https://godoc.org/fmt"},{"range":{"start":{"line":6,"character":1},"end":{"line":6,"character":11}},"target":"https://godoc.org/net/http"},{"range":{"start":{"line":7,"character":1},"end":{"line":7,"character":7}},"target":"https://godoc.org/sort"},{"range":{"start":{"line":8,"character":1},"end":{"line":8,"character":10}},"target":"https://godoc.org/strings"},{"range":{"start":{"line":10,"character":1},"end":{"line":10,"character":38}},"target":"https://godoc.org/github.com/fastly/REDACTED/pkg/errors"},{"range":{"start":{"line":11,"character":1},"end":{"line":11,"character":38}},"target":"https://godoc.org/github.com/fastly/REDACTED/pkg/object"},{"range":{"start":{"line":12,"character":1},"end":{"line":12,"character":39}},"target":"https://godoc.org/github.com/fastly/REDACTED/pkg/replica"},{"range":{"start":{"line":13,"character":1},"end":{"line":13,"character":49}},"target":"https://godoc.org/github.com/prometheus/client_golang/prometheus"}] | |
[Trace - 10:18:26 AM] Sending notification 'textDocument/documentLink' in 306ms. | |
Params: {"textDocument":{"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/ring/node.go"}} | |
[Trace - 10:18:26 AM] Received response 'textDocument/codeAction - (5)' in 0ms. | |
Params: [{"title":"Organize Imports","kind":"source.organizeImports","edit":{"changes":{"file:///Users/pbourgon/mod/REDACTED/pkg/ring/node.go":[]}}}] | |
[Trace - 10:18:26 AM] Sending notification 'textDocument/codeAction' in 311ms. | |
Params: {"textDocument":{"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/ring/node.go"},"range":{"start":{"line":0,"character":0},"end":{"line":0,"character":0}},"context":{"diagnostics":[]}} | |
[Trace - 10:18:26 AM] Sending notification '$/cancelRequest' in 99ms. | |
Params: {"id":5} | |
[Trace - 10:18:26 AM] Received response 'textDocument/documentSymbol - (6)' in 0ms. | |
Params: [{"name":"ErrNoNodesFound","detail":"errors.Error","kind":13,"range":{"start":{"line":17,"character":0},"end":{"line":17,"character":87}},"selectionRange":{"start":{"line":17,"character":4},"end":{"line":17,"character":19}}},{"name":"ConsistencyMode","detail":"uint8","kind":16,"range":{"start":{"line":21,"character":5},"end":{"line":21,"character":26}},"selectionRange":{"start":{"line":21,"character":5},"end":{"line":21,"character":20}}},{"name":"ConsistencyModeSafe","detail":"ConsistencyMode","kind":14,"range":{"start":{"line":34,"character":0},"end":{"line":39,"character":1}},"selectionRange":{"start":{"line":35,"character":1},"end":{"line":35,"character":20}}},{"name":"ConsistencyModeFast","detail":"ConsistencyMode","kind":14,"range":{"start":{"line":34,"character":0},"end":{"line":39,"character":1}},"selectionRange":{"start":{"line":36,"character":1},"end":{"line":36,"character":20}}},{"name":"ConsistencyModeBest","detail":"ConsistencyMode","kind":14,"range":{"start":{"line":34,"character":0},"end":{"line":39,"character":1}},"selectionRange":{"start":{"line":37,"character":1},"end":{"line":37,"character":20}}},{"name":"ConsistencyModeYOLO","detail":"ConsistencyMode","kind":14,"range":{"start":{"line":34,"character":0},"end":{"line":39,"character":1}},"selectionRange":{"start":{"line":38,"character":1},"end":{"line":38,"character":20}}},{"name":"Peer","detail":"interface{...}","kind":11,"range":{"start":{"line":43,"character":5},"end":{"line":47,"character":1}},"selectionRange":{"start":{"line":43,"character":5},"end":{"line":43,"character":9}},"children":[{"name":"Debug","kind":6,"range":{"start":{"line":44,"character":1},"end":{"line":44,"character":63}},"selectionRange":{"start":{"line":44,"character":1},"end":{"line":44,"character":6}}},{"name":"Exec","kind":6,"range":{"start":{"line":45,"character":1},"end":{"line":45,"character":80}},"selectionRange":{"start":{"line":45,"character":1},"end":{"line":45,"character":5}}},{"name":"Sync","kind":6,"range":{"start":{"line":46,"character":1},"end":{"line":46,"character":117}},"selectionRange":{"start":{"line":46,"character":1},"end":{"line":46,"character":5}}}]},{"name":"NopReadRepairs","detail":"*prometheus.CounterVec","kind":13,"range":{"start":{"line":49,"character":0},"end":{"line":56,"character":1}},"selectionRange":{"start":{"line":52,"character":1},"end":{"line":52,"character":15}}},{"name":"Node","detail":"struct{...}","kind":23,"range":{"start":{"line":60,"character":5},"end":{"line":64,"character":1}},"selectionRange":{"start":{"line":60,"character":5},"end":{"line":60,"character":9}},"children":[{"name":"peers","detail":"map[string]Peer","kind":8,"range":{"start":{"line":61,"character":1},"end":{"line":61,"character":28}},"selectionRange":{"start":{"line":61,"character":1},"end":{"line":61,"character":6}}},{"name":"ring","detail":"*ring","kind":8,"range":{"start":{"line":62,"character":1},"end":{"line":62,"character":18}},"selectionRange":{"start":{"line":62,"character":1},"end":{"line":62,"character":5}}},{"name":"readRepairs","detail":"*prometheus.CounterVec","kind":8,"range":{"start":{"line":63,"character":1},"end":{"line":63,"character":35}},"selectionRange":{"start":{"line":63,"character":1},"end":{"line":63,"character":12}}},{"name":"Sync","detail":"(ctx context.Context, incoming map[object.RealmIDTag]replica.SyncRequest)","kind":6,"range":{"start":{"line":261,"character":0},"end":{"line":319,"character":1}},"selectionRange":{"start":{"line":261,"character":15},"end":{"line":261,"character":19}}},{"name":"mustGetPeer","detail":"(node string)","kind":6,"range":{"start":{"line":85,"character":0},"end":{"line":91,"character":1}},"selectionRange":{"start":{"line":85,"character":15},"end":{"line":85,"character":26}}},{"name":"Debug","detail":"(ctx context.Context, op interface{})","kind":6,"range":{"start":{"line":96,"character":0},"end":{"line":133,"character":1}},"selectionRange":{"start":{"line":96,"character":15},"end":{"line":96,"character":20}}},{"name":"ExecMode","detail":"(ctx context.Context, realm string, id string, op interface{}, mode ConsistencyMode)","kind":6,"range":{"start":{"line":137,"character":0},"end":{"line":256,"character":1}},"selectionRange":{"start":{"line":137,"character":15},"end":{"line":137,"character":23}}}]},{"name":"NewNode","detail":"(peers map[string]Peer, replicationFactor int, readRepairs *prometheus.CounterVec)","kind":12,"range":{"start":{"line":68,"character":0},"end":{"line":79,"character":1}},"selectionRange":{"start":{"line":68,"character":5},"end":{"line":68,"character":12}}},{"name":"keyFor","detail":"(realm string, id string)","kind":12,"range":{"start":{"line":81,"character":0},"end":{"line":83,"character":1}},"selectionRange":{"start":{"line":81,"character":5},"end":{"line":81,"character":11}}},{"name":"mergeResponses","detail":"(dst *replica.SyncResponse, src replica.SyncResponse, req replica.SyncRequest)","kind":12,"range":{"start":{"line":325,"character":0},"end":{"line":346,"character":1}},"selectionRange":{"start":{"line":325,"character":5},"end":{"line":325,"character":19}}},{"name":"mergeUniqueValues","detail":"(existing [][]byte, incoming [][]byte)","kind":12,"range":{"start":{"line":348,"character":0},"end":{"line":359,"character":1}},"selectionRange":{"start":{"line":348,"character":5},"end":{"line":348,"character":22}}},{"name":"readRepair","detail":"(ctx context.Context, p Peer, obj object.Raw)","kind":12,"range":{"start":{"line":361,"character":0},"end":{"line":373,"character":1}},"selectionRange":{"start":{"line":361,"character":5},"end":{"line":361,"character":15}}},{"name":"aggregate","detail":"(individual []error)","kind":12,"range":{"start":{"line":375,"character":0},"end":{"line":396,"character":1}},"selectionRange":{"start":{"line":375,"character":5},"end":{"line":375,"character":14}}},{"name":"concat","detail":"(strs map[string]int)","kind":12,"range":{"start":{"line":398,"character":0},"end":{"line":414,"character":1}},"selectionRange":{"start":{"line":398,"character":5},"end":{"line":398,"character":11}}}] | |
[Trace - 10:18:26 AM] Sending notification 'textDocument/documentSymbol' in 312ms. | |
Params: {"textDocument":{"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/ring/node.go"}} | |
[Trace - 10:18:26 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/ring/node.go","diagnostics":[]} | |
[Trace - 10:18:26 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/ring/ring.go","diagnostics":[]} | |
[Trace - 10:18:26 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/doc.go","diagnostics":[]} | |
[Trace - 10:18:26 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/middlewares.go","diagnostics":[]} | |
[Trace - 10:18:26 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/public.go","diagnostics":[]} | |
[Trace - 10:18:26 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/tls.go","diagnostics":[]} | |
[Trace - 10:18:26 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/ring/doc.go","diagnostics":[]} | |
[Trace - 10:18:26 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/debug.go","diagnostics":[]} | |
[Trace - 10:18:26 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/internal.go","diagnostics":[]} | |
[Trace - 10:18:26 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/util.go","diagnostics":[]} | |
[Trace - 10:18:27 AM] Received response 'textDocument/hover - (7)' in 0ms. | |
Params: {"contents":{"kind":"markdown","value":"```go\nvar NopReadRepairs *prometheus.CounterVec\n```"},"range":{"start":{"line":52,"character":1},"end":{"line":52,"character":15}}} | |
[Trace - 10:18:27 AM] Sending notification 'textDocument/hover' in 0ms. | |
Params: {"textDocument":{"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/ring/node.go"},"position":{"line":52,"character":12}} | |
[Trace - 10:18:35 AM] Received response 'textDocument/hover - (8)' in 0ms. | |
Params: {"contents":{"kind":"markdown","value":"Node in a consistent hash ring.\n```go\nNode struct {\n\tpeers map[string]Peer\n\tring *ring\n\treadRepairs *prometheus.CounterVec\n}\n```"},"range":{"start":{"line":74,"character":9},"end":{"line":74,"character":13}}} | |
[Trace - 10:18:35 AM] Sending notification 'textDocument/hover' in 0ms. | |
Params: {"textDocument":{"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/ring/node.go"},"position":{"line":74,"character":12}} | |
[Trace - 10:19:21 AM] Sending notification 'textDocument/didChange' in 1ms. | |
Params: {"textDocument":{"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/tls.go","version":2},"contentChanges":[{"range":{"start":{"line":4,"character":0},"end":{"line":88,"character":0}},"rangeLength":2537,"text":"\t\"io/ioutil\"\n\t\"log\"\n\t\"net\"\n\t\"net/http\"\n\t\"time\"\n\n\t\"github.com/fastly/fst-go/tlscfg\"\n\t\"github.com/fastly/REDACTED/pkg/errors\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\n// NewHTTPServer returns an http.Server properly configured for mutual TLS auth.\nfunc NewHTTPServer(addr string, handler http.Handler, cert, key []byte) (*http.Server, error) {\n\tcfg, err := tlscfg.New(\n\t\ttlscfg.WithKeyPair(cert, key),\n\t\ttlscfg.WithCA(cert, tlscfg.ForServer),\n\t)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"error constructing TLS config for server\")\n\t}\n\treturn &http.Server{\n\t\tAddr: addr,\n\t\tHandler: handler,\n\t\tTLSConfig: cfg,\n\t\tReadHeaderTimeout: 5 * time.Second,\n\t\tWriteTimeout: 10 * time.Second,\n\t\tIdleTimeout: 120 * time.Second,\n\t\tErrorLog: log.New(ioutil.Discard, \"\", 0),\n\t}, nil\n}\n\n// NewHTTPClient returns an http.Client properly configured for mutual TLS auth.\n// The transport will have MaxConnsPerHost and MaxIdleConnsPerHost set to\n// maxConns.\nfunc NewHTTPClient(cert, key []byte, maxConns int, dials prometheus.Counter) (*http.Client, error) {\n\tcfg, err := tlscfg.New(\n\t\ttlscfg.WithKeyPair(cert, key),\n\t\ttlscfg.WithCA(cert, tlscfg.ForClient),\n\t)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"error constructing TLS config for client\")\n\t}\n\treturn &http.Client{\n\t\tTransport: &http.Transport{\n\t\t\tTLSClientConfig: cfg,\n\t\t\tMaxConnsPerHost: maxConns,\n\t\t\tMaxIdleConnsPerHost: maxConns,\n\t\t\tDialContext: func(ctx context.Context, netw, addr string) (net.Conn, error) {\n\t\t\t\tdials.Inc()\n\t\t\t\treturn zeroDialer.DialContext(ctx, netw, addr)\n\t\t\t},\n\t\t},\n\t}, nil\n}\n\n// NopDials may be passed to NewHTTPClient when dials don't need to be\n// tracked, in e.g. tests.\nvar NopDials = prometheus.NewCounter(prometheus.CounterOpts{\n\tName: \"nop_read_repairs\",\n\tHelp: \"No-op read repairs.\",\n"}]} | |
[Info - 10:19:21 AM] 29.891597ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go "env" "GOMOD", stderr: <<>> | |
[Trace - 10:19:21 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"29.891597ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go \"env\" \"GOMOD\", stderr: \u003c\u003c\u003e\u003e\n"} | |
[Info - 10:19:21 AM] 44.032475ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go "list" "-m" "-json" "all", stderr: <<>> | |
[Trace - 10:19:21 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"44.032475ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go \"list\" \"-m\" \"-json\" \"all\", stderr: \u003c\u003c\u003e\u003e\n"} | |
[Info - 10:19:21 AM] 253.058418ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go "list" "-e" "-json" "-compiled=true" "-test=true" "-export=false" "-deps=true" "-find=false" "--" "/Users/pbourgon/mod/REDACTED/pkg/api", stderr: <<>> | |
[Trace - 10:19:21 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"253.058418ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go \"list\" \"-e\" \"-json\" \"-compiled=true\" \"-test=true\" \"-export=false\" \"-deps=true\" \"-find=false\" \"--\" \"/Users/pbourgon/mod/REDACTED/pkg/api\", stderr: \u003c\u003c\u003e\u003e\n"} | |
[Info - 10:19:21 AM] go/packages.Load | |
packages = 2 | |
[Trace - 10:19:21 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"go/packages.Load\n\tpackage = github.com/fastly/REDACTED/pkg/api\n\tfiles = [/Users/pbourgon/mod/REDACTED/pkg/api/debug.go /Users/pbourgon/mod/REDACTED/pkg/api/doc.go /Users/pbourgon/mod/REDACTED/pkg/api/internal.go /Users/pbourgon/mod/REDACTED/pkg/api/middlewares.go /Users/pbourgon/mod/REDACTED/pkg/api/public.go /Users/pbourgon/mod/REDACTED/pkg/api/tls.go /Users/pbourgon/mod/REDACTED/pkg/api/util.go /Users/pbourgon/mod/REDACTED/pkg/api/tls_test.go]"} | |
[Trace - 10:19:21 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"go/packages.Load\n\tpackages = 2"} | |
[Trace - 10:19:21 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"go/packages.Load\n\tpackage = github.com/fastly/REDACTED/pkg/api\n\tfiles = [/Users/pbourgon/mod/REDACTED/pkg/api/debug.go /Users/pbourgon/mod/REDACTED/pkg/api/doc.go /Users/pbourgon/mod/REDACTED/pkg/api/internal.go /Users/pbourgon/mod/REDACTED/pkg/api/middlewares.go /Users/pbourgon/mod/REDACTED/pkg/api/public.go /Users/pbourgon/mod/REDACTED/pkg/api/tls.go /Users/pbourgon/mod/REDACTED/pkg/api/util.go]"} | |
[Info - 10:19:21 AM] go/packages.Load | |
package = github.com/fastly/REDACTED/pkg/api | |
files = [/Users/pbourgon/mod/REDACTED/pkg/api/debug.go /Users/pbourgon/mod/REDACTED/pkg/api/doc.go /Users/pbourgon/mod/REDACTED/pkg/api/internal.go /Users/pbourgon/mod/REDACTED/pkg/api/middlewares.go /Users/pbourgon/mod/REDACTED/pkg/api/public.go /Users/pbourgon/mod/REDACTED/pkg/api/tls.go /Users/pbourgon/mod/REDACTED/pkg/api/util.go /Users/pbourgon/mod/REDACTED/pkg/api/tls_test.go] | |
[Info - 10:19:21 AM] go/packages.Load | |
package = github.com/fastly/REDACTED/pkg/api | |
files = [/Users/pbourgon/mod/REDACTED/pkg/api/debug.go /Users/pbourgon/mod/REDACTED/pkg/api/doc.go /Users/pbourgon/mod/REDACTED/pkg/api/internal.go /Users/pbourgon/mod/REDACTED/pkg/api/middlewares.go /Users/pbourgon/mod/REDACTED/pkg/api/public.go /Users/pbourgon/mod/REDACTED/pkg/api/tls.go /Users/pbourgon/mod/REDACTED/pkg/api/util.go] | |
[Trace - 10:19:21 AM] Sending notification 'textDocument/didChange' in 309ms. | |
Params: {"textDocument":{"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/ring/node.go","version":2},"contentChanges":[{"range":{"start":{"line":52,"character":0},"end":{"line":56,"character":0}},"rangeLength":161,"text":"\tNopReadRepairs = prometheus.NewCounterVec(prometheus.CounterOpts{Name: \"nop_read_repairs\", Help: \"No-op read repairs.\"}, []string{\"target\", \"success\"})\n"}]} | |
[Error - 10:19:21 AM] failed to check package: context canceled | |
[Trace - 10:19:21 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":1,"message":"failed to check package: context canceled"} | |
[Trace - 10:19:21 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":1,"message":"failed to check package: context canceled"} | |
[Trace - 10:19:21 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":1,"message":"failed to compute diagnostics: no CheckPackageHandles for file:///Users/pbourgon/mod/REDACTED/pkg/api/tls.go\n\tfile = file:///Users/pbourgon/mod/REDACTED/pkg/api/tls.go"} | |
[Error - 10:19:21 AM] failed to check package: context canceled | |
[Error - 10:19:21 AM] failed to compute diagnostics: no CheckPackageHandles for file:///Users/pbourgon/mod/REDACTED/pkg/api/tls.go | |
file = file:///Users/pbourgon/mod/REDACTED/pkg/api/tls.go | |
[Trace - 10:19:21 AM] Received response 'textDocument/codeAction - (9)' in 0ms. | |
Params: [{"title":"Organize Imports","kind":"source.organizeImports","edit":{"changes":{"file:///Users/pbourgon/mod/REDACTED/pkg/ring/node.go":[]}}}] | |
[Trace - 10:19:21 AM] Sending notification 'textDocument/codeAction' in 71ms. | |
Params: {"textDocument":{"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/ring/node.go"},"range":{"start":{"line":53,"character":0},"end":{"line":53,"character":0}},"context":{"diagnostics":[]}} | |
[Info - 10:19:21 AM] 17.68272ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go "env" "GOMOD", stderr: <<>> | |
[Trace - 10:19:21 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"17.68272ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go \"env\" \"GOMOD\", stderr: \u003c\u003c\u003e\u003e\n"} | |
[Trace - 10:19:21 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"41.732515ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go \"list\" \"-m\" \"-json\" \"all\", stderr: \u003c\u003c\u003e\u003e\n"} | |
[Info - 10:19:21 AM] 41.732515ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go "list" "-m" "-json" "all", stderr: <<>> | |
[Info - 10:19:22 AM] 222.207786ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go "list" "-e" "-json" "-compiled=true" "-test=true" "-export=false" "-deps=true" "-find=false" "--" "/Users/pbourgon/mod/REDACTED/pkg/api", stderr: <<>> | |
[Trace - 10:19:22 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"222.207786ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go \"list\" \"-e\" \"-json\" \"-compiled=true\" \"-test=true\" \"-export=false\" \"-deps=true\" \"-find=false\" \"--\" \"/Users/pbourgon/mod/REDACTED/pkg/api\", stderr: \u003c\u003c\u003e\u003e\n"} | |
[Info - 10:19:22 AM] go/packages.Load | |
packages = 2 | |
[Trace - 10:19:22 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"go/packages.Load\n\tpackages = 2"} | |
[Trace - 10:19:22 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"go/packages.Load\n\tpackage = github.com/fastly/REDACTED/pkg/api\n\tfiles = [/Users/pbourgon/mod/REDACTED/pkg/api/debug.go /Users/pbourgon/mod/REDACTED/pkg/api/doc.go /Users/pbourgon/mod/REDACTED/pkg/api/internal.go /Users/pbourgon/mod/REDACTED/pkg/api/middlewares.go /Users/pbourgon/mod/REDACTED/pkg/api/public.go /Users/pbourgon/mod/REDACTED/pkg/api/tls.go /Users/pbourgon/mod/REDACTED/pkg/api/util.go /Users/pbourgon/mod/REDACTED/pkg/api/tls_test.go]"} | |
[Trace - 10:19:22 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"go/packages.Load\n\tpackage = github.com/fastly/REDACTED/pkg/api\n\tfiles = [/Users/pbourgon/mod/REDACTED/pkg/api/debug.go /Users/pbourgon/mod/REDACTED/pkg/api/doc.go /Users/pbourgon/mod/REDACTED/pkg/api/internal.go /Users/pbourgon/mod/REDACTED/pkg/api/middlewares.go /Users/pbourgon/mod/REDACTED/pkg/api/public.go /Users/pbourgon/mod/REDACTED/pkg/api/tls.go /Users/pbourgon/mod/REDACTED/pkg/api/util.go]"} | |
[Trace - 10:19:22 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":1,"message":"failed to check package: context canceled"} | |
[Trace - 10:19:22 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":1,"message":"failed to check package: context canceled"} | |
[Trace - 10:19:22 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":1,"message":"failed to compute diagnostics: no CheckPackageHandles for file:///Users/pbourgon/mod/REDACTED/pkg/api/tls.go\n\tfile = file:///Users/pbourgon/mod/REDACTED/pkg/ring/node.go"} | |
[Info - 10:19:22 AM] go/packages.Load | |
package = github.com/fastly/REDACTED/pkg/api | |
files = [/Users/pbourgon/mod/REDACTED/pkg/api/debug.go /Users/pbourgon/mod/REDACTED/pkg/api/doc.go /Users/pbourgon/mod/REDACTED/pkg/api/internal.go /Users/pbourgon/mod/REDACTED/pkg/api/middlewares.go /Users/pbourgon/mod/REDACTED/pkg/api/public.go /Users/pbourgon/mod/REDACTED/pkg/api/tls.go /Users/pbourgon/mod/REDACTED/pkg/api/util.go /Users/pbourgon/mod/REDACTED/pkg/api/tls_test.go] | |
[Info - 10:19:22 AM] go/packages.Load | |
package = github.com/fastly/REDACTED/pkg/api | |
files = [/Users/pbourgon/mod/REDACTED/pkg/api/debug.go /Users/pbourgon/mod/REDACTED/pkg/api/doc.go /Users/pbourgon/mod/REDACTED/pkg/api/internal.go /Users/pbourgon/mod/REDACTED/pkg/api/middlewares.go /Users/pbourgon/mod/REDACTED/pkg/api/public.go /Users/pbourgon/mod/REDACTED/pkg/api/tls.go /Users/pbourgon/mod/REDACTED/pkg/api/util.go] | |
[Trace - 10:19:22 AM] Received response 'textDocument/documentSymbol - (10)' in 0ms. | |
Params: [{"name":"ErrNoNodesFound","detail":"errors.Error","kind":13,"range":{"start":{"line":17,"character":0},"end":{"line":17,"character":87}},"selectionRange":{"start":{"line":17,"character":4},"end":{"line":17,"character":19}}},{"name":"ConsistencyMode","detail":"uint8","kind":16,"range":{"start":{"line":21,"character":5},"end":{"line":21,"character":26}},"selectionRange":{"start":{"line":21,"character":5},"end":{"line":21,"character":20}}},{"name":"ConsistencyModeSafe","detail":"ConsistencyMode","kind":14,"range":{"start":{"line":34,"character":0},"end":{"line":39,"character":1}},"selectionRange":{"start":{"line":35,"character":1},"end":{"line":35,"character":20}}},{"name":"ConsistencyModeFast","detail":"ConsistencyMode","kind":14,"range":{"start":{"line":34,"character":0},"end":{"line":39,"character":1}},"selectionRange":{"start":{"line":36,"character":1},"end":{"line":36,"character":20}}},{"name":"ConsistencyModeBest","detail":"ConsistencyMode","kind":14,"range":{"start":{"line":34,"character":0},"end":{"line":39,"character":1}},"selectionRange":{"start":{"line":37,"character":1},"end":{"line":37,"character":20}}},{"name":"ConsistencyModeYOLO","detail":"ConsistencyMode","kind":14,"range":{"start":{"line":34,"character":0},"end":{"line":39,"character":1}},"selectionRange":{"start":{"line":38,"character":1},"end":{"line":38,"character":20}}},{"name":"Peer","detail":"interface{...}","kind":11,"range":{"start":{"line":43,"character":5},"end":{"line":47,"character":1}},"selectionRange":{"start":{"line":43,"character":5},"end":{"line":43,"character":9}},"children":[{"name":"Debug","kind":6,"range":{"start":{"line":44,"character":1},"end":{"line":44,"character":63}},"selectionRange":{"start":{"line":44,"character":1},"end":{"line":44,"character":6}}},{"name":"Exec","kind":6,"range":{"start":{"line":45,"character":1},"end":{"line":45,"character":80}},"selectionRange":{"start":{"line":45,"character":1},"end":{"line":45,"character":5}}},{"name":"Sync","kind":6,"range":{"start":{"line":46,"character":1},"end":{"line":46,"character":117}},"selectionRange":{"start":{"line":46,"character":1},"end":{"line":46,"character":5}}}]},{"name":"NopReadRepairs","detail":"*prometheus.CounterVec","kind":13,"range":{"start":{"line":49,"character":0},"end":{"line":53,"character":1}},"selectionRange":{"start":{"line":52,"character":1},"end":{"line":52,"character":15}}},{"name":"Node","detail":"struct{...}","kind":23,"range":{"start":{"line":57,"character":5},"end":{"line":61,"character":1}},"selectionRange":{"start":{"line":57,"character":5},"end":{"line":57,"character":9}},"children":[{"name":"peers","detail":"map[string]Peer","kind":8,"range":{"start":{"line":58,"character":1},"end":{"line":58,"character":28}},"selectionRange":{"start":{"line":58,"character":1},"end":{"line":58,"character":6}}},{"name":"ring","detail":"*ring","kind":8,"range":{"start":{"line":59,"character":1},"end":{"line":59,"character":18}},"selectionRange":{"start":{"line":59,"character":1},"end":{"line":59,"character":5}}},{"name":"readRepairs","detail":"*prometheus.CounterVec","kind":8,"range":{"start":{"line":60,"character":1},"end":{"line":60,"character":35}},"selectionRange":{"start":{"line":60,"character":1},"end":{"line":60,"character":12}}},{"name":"Debug","detail":"(ctx context.Context, op interface{})","kind":6,"range":{"start":{"line":93,"character":0},"end":{"line":130,"character":1}},"selectionRange":{"start":{"line":93,"character":15},"end":{"line":93,"character":20}}},{"name":"ExecMode","detail":"(ctx context.Context, realm string, id string, op interface{}, mode ConsistencyMode)","kind":6,"range":{"start":{"line":134,"character":0},"end":{"line":253,"character":1}},"selectionRange":{"start":{"line":134,"character":15},"end":{"line":134,"character":23}}},{"name":"Sync","detail":"(ctx context.Context, incoming map[object.RealmIDTag]replica.SyncRequest)","kind":6,"range":{"start":{"line":258,"character":0},"end":{"line":316,"character":1}},"selectionRange":{"start":{"line":258,"character":15},"end":{"line":258,"character":19}}},{"name":"mustGetPeer","detail":"(node string)","kind":6,"range":{"start":{"line":82,"character":0},"end":{"line":88,"character":1}},"selectionRange":{"start":{"line":82,"character":15},"end":{"line":82,"character":26}}}]},{"name":"NewNode","detail":"(peers map[string]Peer, replicationFactor int, readRepairs *prometheus.CounterVec)","kind":12,"range":{"start":{"line":65,"character":0},"end":{"line":76,"character":1}},"selectionRange":{"start":{"line":65,"character":5},"end":{"line":65,"character":12}}},{"name":"keyFor","detail":"(realm string, id string)","kind":12,"range":{"start":{"line":78,"character":0},"end":{"line":80,"character":1}},"selectionRange":{"start":{"line":78,"character":5},"end":{"line":78,"character":11}}},{"name":"mergeResponses","detail":"(dst *replica.SyncResponse, src replica.SyncResponse, req replica.SyncRequest)","kind":12,"range":{"start":{"line":322,"character":0},"end":{"line":343,"character":1}},"selectionRange":{"start":{"line":322,"character":5},"end":{"line":322,"character":19}}},{"name":"mergeUniqueValues","detail":"(existing [][]byte, incoming [][]byte)","kind":12,"range":{"start":{"line":345,"character":0},"end":{"line":356,"character":1}},"selectionRange":{"start":{"line":345,"character":5},"end":{"line":345,"character":22}}},{"name":"readRepair","detail":"(ctx context.Context, p Peer, obj object.Raw)","kind":12,"range":{"start":{"line":358,"character":0},"end":{"line":370,"character":1}},"selectionRange":{"start":{"line":358,"character":5},"end":{"line":358,"character":15}}},{"name":"aggregate","detail":"(individual []error)","kind":12,"range":{"start":{"line":372,"character":0},"end":{"line":393,"character":1}},"selectionRange":{"start":{"line":372,"character":5},"end":{"line":372,"character":14}}},{"name":"concat","detail":"(strs map[string]int)","kind":12,"range":{"start":{"line":395,"character":0},"end":{"line":411,"character":1}},"selectionRange":{"start":{"line":395,"character":5},"end":{"line":395,"character":11}}}] | |
[Trace - 10:19:22 AM] Sending notification 'textDocument/documentSymbol' in 229ms. | |
Params: {"textDocument":{"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/ring/node.go"}} | |
[Trace - 10:19:22 AM] Received response 'textDocument/hover - (11)' in 0ms. | |
Params: {"contents":{"kind":"markdown","value":"```go\nfield readRepairs *prometheus.CounterVec\n```"},"range":{"start":{"line":74,"character":2},"end":{"line":74,"character":13}}} | |
[Trace - 10:19:22 AM] Sending notification 'textDocument/hover' in 218ms. | |
Params: {"textDocument":{"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/ring/node.go"},"position":{"line":74,"character":12}} | |
[Error - 10:19:22 AM] failed to check package: context canceled | |
[Error - 10:19:22 AM] failed to check package: context canceled | |
[Error - 10:19:22 AM] failed to compute diagnostics: no CheckPackageHandles for file:///Users/pbourgon/mod/REDACTED/pkg/api/tls.go | |
file = file:///Users/pbourgon/mod/REDACTED/pkg/ring/node.go | |
[Trace - 10:19:22 AM] Received response 'textDocument/documentLink - (12)' in 0ms. | |
Params: [{"range":{"start":{"line":3,"character":1},"end":{"line":3,"character":8}},"target":"https://godoc.org/bytes"},{"range":{"start":{"line":4,"character":1},"end":{"line":4,"character":10}},"target":"https://godoc.org/context"},{"range":{"start":{"line":5,"character":1},"end":{"line":5,"character":6}},"target":"https://godoc.org/fmt"},{"range":{"start":{"line":6,"character":1},"end":{"line":6,"character":11}},"target":"https://godoc.org/net/http"},{"range":{"start":{"line":7,"character":1},"end":{"line":7,"character":7}},"target":"https://godoc.org/sort"},{"range":{"start":{"line":8,"character":1},"end":{"line":8,"character":10}},"target":"https://godoc.org/strings"},{"range":{"start":{"line":10,"character":1},"end":{"line":10,"character":38}},"target":"https://godoc.org/github.com/fastly/REDACTED/pkg/errors"},{"range":{"start":{"line":11,"character":1},"end":{"line":11,"character":38}},"target":"https://godoc.org/github.com/fastly/REDACTED/pkg/object"},{"range":{"start":{"line":12,"character":1},"end":{"line":12,"character":39}},"target":"https://godoc.org/github.com/fastly/REDACTED/pkg/replica"},{"range":{"start":{"line":13,"character":1},"end":{"line":13,"character":49}},"target":"https://godoc.org/github.com/prometheus/client_golang/prometheus"}] | |
[Trace - 10:19:22 AM] Sending notification 'textDocument/documentLink' in 1ms. | |
Params: {"textDocument":{"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/ring/node.go"}} | |
[Trace - 10:19:22 AM] Received response 'textDocument/hover - (13)' in 0ms. | |
Params: {"contents":{"kind":"markdown","value":"```go\nfield readRepairs *prometheus.CounterVec\n```"},"range":{"start":{"line":74,"character":2},"end":{"line":74,"character":13}}} | |
[Trace - 10:19:22 AM] Sending notification 'textDocument/hover' in 0ms. | |
Params: {"textDocument":{"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/ring/node.go"},"position":{"line":74,"character":12}} | |
[Trace - 10:19:31 AM] Sending notification 'textDocument/didChange' in 0ms. | |
Params: {"textDocument":{"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/tls.go","version":3},"contentChanges":[{"range":{"start":{"line":4,"character":0},"end":{"line":64,"character":0}},"rangeLength":1836,"text":"\t\"crypto/tls\"\n\t\"io/ioutil\"\n\t\"log\"\n\t\"net\"\n\t\"net/http\"\n\t\"time\"\n\n\t\"github.com/fastly/fst-go/tlscfg\"\n\t\"github.com/fastly/REDACTED/pkg/errors\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\n// KeyPair combines a cert and a key.\ntype KeyPair struct {\n\tCert []byte\n\tKey []byte\n}\n\n// NewTLSServer returns an http.Server properly configured for mutual TLS auth.\n// Because the server can present multiple TLS key pairs, the ListenAndServe\n// helper will not work; callers should call server.Serve with the provided\n// net.Listener. Remember to clean up both the Server and the Listener.\nfunc NewTLSServer(netw, addr string, handler http.Handler, present KeyPair, accept []KeyPair) (*http.Server, net.Listener, error) {\n\topts := []tlscfg.Opt{\n\t\ttlscfg.WithKeyPair(present.Cert, present.Key),\n\t}\n\tfor _, keyPair := range accept {\n\t\topts = append(opts, tlscfg.WithCA(keyPair.Cert, tlscfg.ForServer))\n\t}\n\n\tcfg, err := tlscfg.New(opts...)\n\tif err != nil {\n\t\treturn nil, nil, errors.Wrap(err, \"error constructing TLS config for server\")\n\t}\n\n\tln, err := tls.Listen(netw, addr, cfg)\n\tif err != nil {\n\t\treturn nil, nil, errors.Wrap(err, \"error binding TLS listener\")\n\t}\n\n\treturn &http.Server{\n\t\tHandler: handler,\n\t\tTLSConfig: cfg,\n\t\tReadHeaderTimeout: 5 * time.Second,\n\t\tWriteTimeout: 10 * time.Second,\n\t\tIdleTimeout: 120 * time.Second,\n\t\tErrorLog: log.New(ioutil.Discard, \"\", 0),\n\t}, ln, nil\n}\n\n// NewTLSClient returns an http.Client properly configured for mutual TLS auth.\n// The transport will have MaxConnsPerHost and MaxIdleConnsPerHost set to\n// maxConns.\nfunc NewTLSClient(present KeyPair, accept []KeyPair, maxConns int, dials prometheus.Counter) (*http.Client, error) {\n\topts := []tlscfg.Opt{\n\t\ttlscfg.WithKeyPair(present.Cert, present.Key),\n\t}\n\tfor _, keyPair := range accept {\n\t\topts = append(opts, tlscfg.WithCA(keyPair.Cert, tlscfg.ForClient))\n\t}\n\n\tcfg, err := tlscfg.New(opts...)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"error constructing TLS config for client\")\n\t}\n\n\treturn &http.Client{\n\t\tTransport: &http.Transport{\n\t\t\tTLSClientConfig: cfg,\n\t\t\tMaxConnsPerHost: maxConns,\n\t\t\tMaxIdleConnsPerHost: maxConns,\n\t\t\tDialContext: func(ctx context.Context, netw, addr string) (net.Conn, error) {\n\t\t\t\tdials.Inc()\n\t\t\t\treturn zeroDialer.DialContext(ctx, netw, addr)\n\t\t\t},\n\t\t},\n\t}, nil\n}\n\n// NopDials may be passed to NewHTTPClient when dials don't need to be\n// tracked, in e.g. tests.\nvar NopDials = prometheus.NewCounter(prometheus.CounterOpts{\n\tName: \"nop_dials\",\n\tHelp: \"No-op dials.\",\n"}]} | |
[Trace - 10:19:31 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":1,"message":"failed to check package: context canceled"} | |
[Error - 10:19:31 AM] failed to check package: context canceled | |
[Trace - 10:19:31 AM] Sending notification 'textDocument/didChange' in 0ms. | |
Params: {"textDocument":{"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/ring/node.go","version":3},"contentChanges":[{"range":{"start":{"line":52,"character":0},"end":{"line":53,"character":0}},"rangeLength":153,"text":"\tNopReadRepairs = prometheus.NewCounterVec(prometheus.CounterOpts{\n\t\tName: \"nop_read_repairs\",\n\t\tHelp: \"No-op read repairs.\",\n\t}, []string{\"target\", \"success\"})\n"}]} | |
[Trace - 10:19:31 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":1,"message":"failed to compute diagnostics: no CheckPackageHandles for file:///Users/pbourgon/mod/REDACTED/pkg/api/tls.go\n\tfile = file:///Users/pbourgon/mod/REDACTED/pkg/api/tls.go"} | |
[Trace - 10:19:31 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":1,"message":"failed to check package: context canceled"} | |
[Error - 10:19:31 AM] failed to compute diagnostics: no CheckPackageHandles for file:///Users/pbourgon/mod/REDACTED/pkg/api/tls.go | |
file = file:///Users/pbourgon/mod/REDACTED/pkg/api/tls.go | |
[Error - 10:19:31 AM] failed to check package: context canceled | |
[Trace - 10:19:31 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/public.go","diagnostics":[{"range":{"start":{"line":16,"character":1},"end":{"line":16,"character":36}},"severity":1,"source":"LSP","message":"could not import github.com/fastly/REDACTED/pkg/auth (context canceled)"}]} | |
[Trace - 10:19:31 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/tls.go","diagnostics":[{"range":{"start":{"line":4,"character":1},"end":{"line":4,"character":13}},"severity":1,"source":"LSP","message":"could not import crypto/tls (no package data for import path crypto/tls)"}]} | |
[Trace - 10:19:31 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/util.go","diagnostics":[]} | |
[Trace - 10:19:31 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/ring/doc.go","diagnostics":[]} | |
[Trace - 10:19:31 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/ring/node.go","diagnostics":[]} | |
[Trace - 10:19:31 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/ring/ring.go","diagnostics":[]} | |
[Trace - 10:19:31 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/middlewares.go","diagnostics":[]} | |
[Trace - 10:19:31 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/debug.go","diagnostics":[{"range":{"start":{"line":14,"character":1},"end":{"line":14,"character":36}},"severity":1,"source":"LSP","message":"could not import github.com/fastly/REDACTED/pkg/ring (context canceled)"}]} | |
[Trace - 10:19:31 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/doc.go","diagnostics":[]} | |
[Trace - 10:19:31 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/internal.go","diagnostics":[]} | |
[Trace - 10:19:31 AM] Received response 'textDocument/codeAction - (14)' in 0ms. | |
Params: [{"title":"Organize Imports","kind":"source.organizeImports","edit":{"changes":{"file:///Users/pbourgon/mod/REDACTED/pkg/ring/node.go":[]}}}] | |
[Trace - 10:19:31 AM] Sending notification 'textDocument/codeAction' in 6ms. | |
Params: {"textDocument":{"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/ring/node.go"},"range":{"start":{"line":56,"character":0},"end":{"line":56,"character":0}},"context":{"diagnostics":[]}} | |
[Trace - 10:19:31 AM] Received response 'textDocument/documentSymbol - (15)' in 0ms. | |
Params: [{"name":"ErrNoNodesFound","detail":"errors.Error","kind":13,"range":{"start":{"line":17,"character":0},"end":{"line":17,"character":87}},"selectionRange":{"start":{"line":17,"character":4},"end":{"line":17,"character":19}}},{"name":"ConsistencyMode","detail":"uint8","kind":16,"range":{"start":{"line":21,"character":5},"end":{"line":21,"character":26}},"selectionRange":{"start":{"line":21,"character":5},"end":{"line":21,"character":20}}},{"name":"ConsistencyModeSafe","detail":"ConsistencyMode","kind":14,"range":{"start":{"line":34,"character":0},"end":{"line":39,"character":1}},"selectionRange":{"start":{"line":35,"character":1},"end":{"line":35,"character":20}}},{"name":"ConsistencyModeFast","detail":"ConsistencyMode","kind":14,"range":{"start":{"line":34,"character":0},"end":{"line":39,"character":1}},"selectionRange":{"start":{"line":36,"character":1},"end":{"line":36,"character":20}}},{"name":"ConsistencyModeBest","detail":"ConsistencyMode","kind":14,"range":{"start":{"line":34,"character":0},"end":{"line":39,"character":1}},"selectionRange":{"start":{"line":37,"character":1},"end":{"line":37,"character":20}}},{"name":"ConsistencyModeYOLO","detail":"ConsistencyMode","kind":14,"range":{"start":{"line":34,"character":0},"end":{"line":39,"character":1}},"selectionRange":{"start":{"line":38,"character":1},"end":{"line":38,"character":20}}},{"name":"Peer","detail":"interface{...}","kind":11,"range":{"start":{"line":43,"character":5},"end":{"line":47,"character":1}},"selectionRange":{"start":{"line":43,"character":5},"end":{"line":43,"character":9}},"children":[{"name":"Debug","kind":6,"range":{"start":{"line":44,"character":1},"end":{"line":44,"character":63}},"selectionRange":{"start":{"line":44,"character":1},"end":{"line":44,"character":6}}},{"name":"Exec","kind":6,"range":{"start":{"line":45,"character":1},"end":{"line":45,"character":80}},"selectionRange":{"start":{"line":45,"character":1},"end":{"line":45,"character":5}}},{"name":"Sync","kind":6,"range":{"start":{"line":46,"character":1},"end":{"line":46,"character":117}},"selectionRange":{"start":{"line":46,"character":1},"end":{"line":46,"character":5}}}]},{"name":"NopReadRepairs","detail":"*prometheus.CounterVec","kind":13,"range":{"start":{"line":49,"character":0},"end":{"line":56,"character":1}},"selectionRange":{"start":{"line":52,"character":1},"end":{"line":52,"character":15}}},{"name":"Node","detail":"struct{...}","kind":23,"range":{"start":{"line":60,"character":5},"end":{"line":64,"character":1}},"selectionRange":{"start":{"line":60,"character":5},"end":{"line":60,"character":9}},"children":[{"name":"peers","detail":"map[string]Peer","kind":8,"range":{"start":{"line":61,"character":1},"end":{"line":61,"character":28}},"selectionRange":{"start":{"line":61,"character":1},"end":{"line":61,"character":6}}},{"name":"ring","detail":"*ring","kind":8,"range":{"start":{"line":62,"character":1},"end":{"line":62,"character":18}},"selectionRange":{"start":{"line":62,"character":1},"end":{"line":62,"character":5}}},{"name":"readRepairs","detail":"*prometheus.CounterVec","kind":8,"range":{"start":{"line":63,"character":1},"end":{"line":63,"character":35}},"selectionRange":{"start":{"line":63,"character":1},"end":{"line":63,"character":12}}},{"name":"ExecMode","detail":"(ctx context.Context, realm string, id string, op interface{}, mode ConsistencyMode)","kind":6,"range":{"start":{"line":137,"character":0},"end":{"line":256,"character":1}},"selectionRange":{"start":{"line":137,"character":15},"end":{"line":137,"character":23}}},{"name":"Sync","detail":"(ctx context.Context, incoming map[object.RealmIDTag]replica.SyncRequest)","kind":6,"range":{"start":{"line":261,"character":0},"end":{"line":319,"character":1}},"selectionRange":{"start":{"line":261,"character":15},"end":{"line":261,"character":19}}},{"name":"mustGetPeer","detail":"(node string)","kind":6,"range":{"start":{"line":85,"character":0},"end":{"line":91,"character":1}},"selectionRange":{"start":{"line":85,"character":15},"end":{"line":85,"character":26}}},{"name":"Debug","detail":"(ctx context.Context, op interface{})","kind":6,"range":{"start":{"line":96,"character":0},"end":{"line":133,"character":1}},"selectionRange":{"start":{"line":96,"character":15},"end":{"line":96,"character":20}}}]},{"name":"NewNode","detail":"(peers map[string]Peer, replicationFactor int, readRepairs *prometheus.CounterVec)","kind":12,"range":{"start":{"line":68,"character":0},"end":{"line":79,"character":1}},"selectionRange":{"start":{"line":68,"character":5},"end":{"line":68,"character":12}}},{"name":"keyFor","detail":"(realm string, id string)","kind":12,"range":{"start":{"line":81,"character":0},"end":{"line":83,"character":1}},"selectionRange":{"start":{"line":81,"character":5},"end":{"line":81,"character":11}}},{"name":"mergeResponses","detail":"(dst *replica.SyncResponse, src replica.SyncResponse, req replica.SyncRequest)","kind":12,"range":{"start":{"line":325,"character":0},"end":{"line":346,"character":1}},"selectionRange":{"start":{"line":325,"character":5},"end":{"line":325,"character":19}}},{"name":"mergeUniqueValues","detail":"(existing [][]byte, incoming [][]byte)","kind":12,"range":{"start":{"line":348,"character":0},"end":{"line":359,"character":1}},"selectionRange":{"start":{"line":348,"character":5},"end":{"line":348,"character":22}}},{"name":"readRepair","detail":"(ctx context.Context, p Peer, obj object.Raw)","kind":12,"range":{"start":{"line":361,"character":0},"end":{"line":373,"character":1}},"selectionRange":{"start":{"line":361,"character":5},"end":{"line":361,"character":15}}},{"name":"aggregate","detail":"(individual []error)","kind":12,"range":{"start":{"line":375,"character":0},"end":{"line":396,"character":1}},"selectionRange":{"start":{"line":375,"character":5},"end":{"line":375,"character":14}}},{"name":"concat","detail":"(strs map[string]int)","kind":12,"range":{"start":{"line":398,"character":0},"end":{"line":414,"character":1}},"selectionRange":{"start":{"line":398,"character":5},"end":{"line":398,"character":11}}}] | |
[Trace - 10:19:31 AM] Sending notification 'textDocument/documentSymbol' in 1ms. | |
Params: {"textDocument":{"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/ring/node.go"}} | |
[Trace - 10:19:31 AM] Received response 'textDocument/hover - (16)' in 0ms. | |
Params: {"contents":{"kind":"markdown","value":"Node in a consistent hash ring.\n```go\nNode struct {\n\tpeers map[string]Peer\n\tring *ring\n\treadRepairs *prometheus.CounterVec\n}\n```"},"range":{"start":{"line":74,"character":9},"end":{"line":74,"character":13}}} | |
[Trace - 10:19:31 AM] Sending notification 'textDocument/hover' in 0ms. | |
Params: {"textDocument":{"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/ring/node.go"},"position":{"line":74,"character":12}} | |
[Trace - 10:19:32 AM] Received response 'textDocument/documentLink - (17)' in 0ms. | |
Params: [{"range":{"start":{"line":3,"character":1},"end":{"line":3,"character":8}},"target":"https://godoc.org/bytes"},{"range":{"start":{"line":4,"character":1},"end":{"line":4,"character":10}},"target":"https://godoc.org/context"},{"range":{"start":{"line":5,"character":1},"end":{"line":5,"character":6}},"target":"https://godoc.org/fmt"},{"range":{"start":{"line":6,"character":1},"end":{"line":6,"character":11}},"target":"https://godoc.org/net/http"},{"range":{"start":{"line":7,"character":1},"end":{"line":7,"character":7}},"target":"https://godoc.org/sort"},{"range":{"start":{"line":8,"character":1},"end":{"line":8,"character":10}},"target":"https://godoc.org/strings"},{"range":{"start":{"line":10,"character":1},"end":{"line":10,"character":38}},"target":"https://godoc.org/github.com/fastly/REDACTED/pkg/errors"},{"range":{"start":{"line":11,"character":1},"end":{"line":11,"character":38}},"target":"https://godoc.org/github.com/fastly/REDACTED/pkg/object"},{"range":{"start":{"line":12,"character":1},"end":{"line":12,"character":39}},"target":"https://godoc.org/github.com/fastly/REDACTED/pkg/replica"},{"range":{"start":{"line":13,"character":1},"end":{"line":13,"character":49}},"target":"https://godoc.org/github.com/prometheus/client_golang/prometheus"}] | |
[Trace - 10:19:32 AM] Sending notification 'textDocument/documentLink' in 1ms. | |
Params: {"textDocument":{"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/ring/node.go"}} | |
[Trace - 10:19:32 AM] Received response 'textDocument/hover - (18)' in 0ms. | |
Params: {"contents":{"kind":"markdown","value":"Node in a consistent hash ring.\n```go\nNode struct {\n\tpeers map[string]Peer\n\tring *ring\n\treadRepairs *prometheus.CounterVec\n}\n```"},"range":{"start":{"line":74,"character":9},"end":{"line":74,"character":13}}} | |
[Trace - 10:19:32 AM] Sending notification 'textDocument/hover' in 1ms. | |
Params: {"textDocument":{"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/ring/node.go"},"position":{"line":74,"character":12}} | |
[Trace - 10:20:09 AM] Sending notification 'textDocument/didChange' in 2ms. | |
Params: {"textDocument":{"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/tls.go","version":4},"contentChanges":[{"range":{"start":{"line":4,"character":0},"end":{"line":88,"character":0}},"rangeLength":2537,"text":"\t\"io/ioutil\"\n\t\"log\"\n\t\"net\"\n\t\"net/http\"\n\t\"time\"\n\n\t\"github.com/fastly/fst-go/tlscfg\"\n\t\"github.com/fastly/REDACTED/pkg/errors\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\n// NewHTTPServer returns an http.Server properly configured for mutual TLS auth.\nfunc NewHTTPServer(addr string, handler http.Handler, cert, key []byte) (*http.Server, error) {\n\tcfg, err := tlscfg.New(\n\t\ttlscfg.WithKeyPair(cert, key),\n\t\ttlscfg.WithCA(cert, tlscfg.ForServer),\n\t)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"error constructing TLS config for server\")\n\t}\n\treturn &http.Server{\n\t\tAddr: addr,\n\t\tHandler: handler,\n\t\tTLSConfig: cfg,\n\t\tReadHeaderTimeout: 5 * time.Second,\n\t\tWriteTimeout: 10 * time.Second,\n\t\tIdleTimeout: 120 * time.Second,\n\t\tErrorLog: log.New(ioutil.Discard, \"\", 0),\n\t}, nil\n}\n\n// NewHTTPClient returns an http.Client properly configured for mutual TLS auth.\n// The transport will have MaxConnsPerHost and MaxIdleConnsPerHost set to\n// maxConns.\nfunc NewHTTPClient(cert, key []byte, maxConns int, dials prometheus.Counter) (*http.Client, error) {\n\tcfg, err := tlscfg.New(\n\t\ttlscfg.WithKeyPair(cert, key),\n\t\ttlscfg.WithCA(cert, tlscfg.ForClient),\n\t)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"error constructing TLS config for client\")\n\t}\n\treturn &http.Client{\n\t\tTransport: &http.Transport{\n\t\t\tTLSClientConfig: cfg,\n\t\t\tMaxConnsPerHost: maxConns,\n\t\t\tMaxIdleConnsPerHost: maxConns,\n\t\t\tDialContext: func(ctx context.Context, netw, addr string) (net.Conn, error) {\n\t\t\t\tdials.Inc()\n\t\t\t\treturn zeroDialer.DialContext(ctx, netw, addr)\n\t\t\t},\n\t\t},\n\t}, nil\n}\n\n// NopDials may be passed to NewHTTPClient when dials don't need to be\n// tracked, in e.g. tests.\nvar NopDials = prometheus.NewCounter(prometheus.CounterOpts{\n\tName: \"nop_read_repairs\",\n\tHelp: \"No-op read repairs.\",\n"}]} | |
[Trace - 10:20:10 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"47.546147ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go \"env\" \"GOMOD\", stderr: \u003c\u003c\u003e\u003e\n"} | |
[Info - 10:20:10 AM] 47.546147ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go "env" "GOMOD", stderr: <<>> | |
[Info - 10:20:10 AM] 74.268666ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go "list" "-m" "-json" "all", stderr: <<>> | |
[Trace - 10:20:10 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"74.268666ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go \"list\" \"-m\" \"-json\" \"all\", stderr: \u003c\u003c\u003e\u003e\n"} | |
[Info - 10:20:10 AM] 231.715605ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go "list" "-e" "-json" "-compiled=true" "-test=true" "-export=false" "-deps=true" "-find=false" "--" "/Users/pbourgon/mod/REDACTED/pkg/api", stderr: <<>> | |
[Trace - 10:20:10 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"231.715605ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go \"list\" \"-e\" \"-json\" \"-compiled=true\" \"-test=true\" \"-export=false\" \"-deps=true\" \"-find=false\" \"--\" \"/Users/pbourgon/mod/REDACTED/pkg/api\", stderr: \u003c\u003c\u003e\u003e\n"} | |
[Info - 10:20:10 AM] go/packages.Load | |
packages = 2 | |
[Trace - 10:20:10 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"go/packages.Load\n\tpackage = github.com/fastly/REDACTED/pkg/api\n\tfiles = [/Users/pbourgon/mod/REDACTED/pkg/api/debug.go /Users/pbourgon/mod/REDACTED/pkg/api/doc.go /Users/pbourgon/mod/REDACTED/pkg/api/internal.go /Users/pbourgon/mod/REDACTED/pkg/api/middlewares.go /Users/pbourgon/mod/REDACTED/pkg/api/public.go /Users/pbourgon/mod/REDACTED/pkg/api/tls.go /Users/pbourgon/mod/REDACTED/pkg/api/util.go /Users/pbourgon/mod/REDACTED/pkg/api/tls_test.go]"} | |
[Trace - 10:20:10 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"go/packages.Load\n\tpackage = github.com/fastly/REDACTED/pkg/api\n\tfiles = [/Users/pbourgon/mod/REDACTED/pkg/api/debug.go /Users/pbourgon/mod/REDACTED/pkg/api/doc.go /Users/pbourgon/mod/REDACTED/pkg/api/internal.go /Users/pbourgon/mod/REDACTED/pkg/api/middlewares.go /Users/pbourgon/mod/REDACTED/pkg/api/public.go /Users/pbourgon/mod/REDACTED/pkg/api/tls.go /Users/pbourgon/mod/REDACTED/pkg/api/util.go]"} | |
[Trace - 10:20:10 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"go/packages.Load\n\tpackages = 2"} | |
[Info - 10:20:10 AM] go/packages.Load | |
package = github.com/fastly/REDACTED/pkg/api | |
files = [/Users/pbourgon/mod/REDACTED/pkg/api/debug.go /Users/pbourgon/mod/REDACTED/pkg/api/doc.go /Users/pbourgon/mod/REDACTED/pkg/api/internal.go /Users/pbourgon/mod/REDACTED/pkg/api/middlewares.go /Users/pbourgon/mod/REDACTED/pkg/api/public.go /Users/pbourgon/mod/REDACTED/pkg/api/tls.go /Users/pbourgon/mod/REDACTED/pkg/api/util.go /Users/pbourgon/mod/REDACTED/pkg/api/tls_test.go] | |
[Trace - 10:20:10 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":1,"message":"failed to check package: context canceled"} | |
[Trace - 10:20:10 AM] Sending notification 'textDocument/didChange' in 313ms. | |
Params: {"textDocument":{"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/ring/node.go","version":4},"contentChanges":[{"range":{"start":{"line":52,"character":0},"end":{"line":56,"character":0}},"rangeLength":161,"text":"\tNopReadRepairs = prometheus.NewCounterVec(prometheus.CounterOpts{Name: \"nop_read_repairs\", Help: \"No-op read repairs.\"}, []string{\"target\", \"success\"})\n"}]} | |
[Info - 10:20:10 AM] go/packages.Load | |
package = github.com/fastly/REDACTED/pkg/api | |
files = [/Users/pbourgon/mod/REDACTED/pkg/api/debug.go /Users/pbourgon/mod/REDACTED/pkg/api/doc.go /Users/pbourgon/mod/REDACTED/pkg/api/internal.go /Users/pbourgon/mod/REDACTED/pkg/api/middlewares.go /Users/pbourgon/mod/REDACTED/pkg/api/public.go /Users/pbourgon/mod/REDACTED/pkg/api/tls.go /Users/pbourgon/mod/REDACTED/pkg/api/util.go] | |
[Trace - 10:20:10 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":1,"message":"failed to check package: context canceled"} | |
[Trace - 10:20:10 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":1,"message":"failed to compute diagnostics: no CheckPackageHandles for file:///Users/pbourgon/mod/REDACTED/pkg/api/tls.go\n\tfile = file:///Users/pbourgon/mod/REDACTED/pkg/api/tls.go"} | |
[Error - 10:20:10 AM] failed to check package: context canceled | |
[Error - 10:20:10 AM] failed to compute diagnostics: no CheckPackageHandles for file:///Users/pbourgon/mod/REDACTED/pkg/api/tls.go | |
file = file:///Users/pbourgon/mod/REDACTED/pkg/api/tls.go | |
[Error - 10:20:10 AM] failed to check package: context canceled | |
[Trace - 10:20:10 AM] Received response 'textDocument/codeAction - (19)' in 0ms. | |
Params: [{"title":"Organize Imports","kind":"source.organizeImports","edit":{"changes":{"file:///Users/pbourgon/mod/REDACTED/pkg/ring/node.go":[]}}}] | |
[Trace - 10:20:10 AM] Sending notification 'textDocument/codeAction' in 73ms. | |
Params: {"textDocument":{"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/ring/node.go"},"range":{"start":{"line":53,"character":0},"end":{"line":53,"character":0}},"context":{"diagnostics":[]}} | |
[Info - 10:20:10 AM] 23.277989ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go "env" "GOMOD", stderr: <<>> | |
[Trace - 10:20:10 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"23.277989ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go \"env\" \"GOMOD\", stderr: \u003c\u003c\u003e\u003e\n"} | |
[Info - 10:20:10 AM] 37.71221ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go "list" "-m" "-json" "all", stderr: <<>> | |
[Trace - 10:20:10 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"37.71221ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go \"list\" \"-m\" \"-json\" \"all\", stderr: \u003c\u003c\u003e\u003e\n"} | |
[Info - 10:20:10 AM] 228.880161ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go "list" "-e" "-json" "-compiled=true" "-test=true" "-export=false" "-deps=true" "-find=false" "--" "/Users/pbourgon/mod/REDACTED/pkg/api", stderr: <<>> | |
[Trace - 10:20:10 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"228.880161ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go \"list\" \"-e\" \"-json\" \"-compiled=true\" \"-test=true\" \"-export=false\" \"-deps=true\" \"-find=false\" \"--\" \"/Users/pbourgon/mod/REDACTED/pkg/api\", stderr: \u003c\u003c\u003e\u003e\n"} | |
[Info - 10:20:10 AM] go/packages.Load | |
package = github.com/fastly/REDACTED/pkg/api | |
files = [/Users/pbourgon/mod/REDACTED/pkg/api/debug.go /Users/pbourgon/mod/REDACTED/pkg/api/doc.go /Users/pbourgon/mod/REDACTED/pkg/api/internal.go /Users/pbourgon/mod/REDACTED/pkg/api/middlewares.go /Users/pbourgon/mod/REDACTED/pkg/api/public.go /Users/pbourgon/mod/REDACTED/pkg/api/tls.go /Users/pbourgon/mod/REDACTED/pkg/api/util.go /Users/pbourgon/mod/REDACTED/pkg/api/tls_test.go] | |
[Trace - 10:20:10 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"go/packages.Load\n\tpackage = github.com/fastly/REDACTED/pkg/api\n\tfiles = [/Users/pbourgon/mod/REDACTED/pkg/api/debug.go /Users/pbourgon/mod/REDACTED/pkg/api/doc.go /Users/pbourgon/mod/REDACTED/pkg/api/internal.go /Users/pbourgon/mod/REDACTED/pkg/api/middlewares.go /Users/pbourgon/mod/REDACTED/pkg/api/public.go /Users/pbourgon/mod/REDACTED/pkg/api/tls.go /Users/pbourgon/mod/REDACTED/pkg/api/util.go /Users/pbourgon/mod/REDACTED/pkg/api/tls_test.go]"} | |
[Trace - 10:20:10 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"go/packages.Load\n\tpackages = 2"} | |
[Trace - 10:20:10 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"go/packages.Load\n\tpackage = github.com/fastly/REDACTED/pkg/api\n\tfiles = [/Users/pbourgon/mod/REDACTED/pkg/api/debug.go /Users/pbourgon/mod/REDACTED/pkg/api/doc.go /Users/pbourgon/mod/REDACTED/pkg/api/internal.go /Users/pbourgon/mod/REDACTED/pkg/api/middlewares.go /Users/pbourgon/mod/REDACTED/pkg/api/public.go /Users/pbourgon/mod/REDACTED/pkg/api/tls.go /Users/pbourgon/mod/REDACTED/pkg/api/util.go]"} | |
[Trace - 10:20:10 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":1,"message":"failed to check package: context canceled"} | |
[Trace - 10:20:10 AM] Received response 'textDocument/documentSymbol - (20)' in 0ms. | |
Params: [{"name":"ErrNoNodesFound","detail":"errors.Error","kind":13,"range":{"start":{"line":17,"character":0},"end":{"line":17,"character":87}},"selectionRange":{"start":{"line":17,"character":4},"end":{"line":17,"character":19}}},{"name":"ConsistencyMode","detail":"uint8","kind":16,"range":{"start":{"line":21,"character":5},"end":{"line":21,"character":26}},"selectionRange":{"start":{"line":21,"character":5},"end":{"line":21,"character":20}}},{"name":"ConsistencyModeSafe","detail":"ConsistencyMode","kind":14,"range":{"start":{"line":34,"character":0},"end":{"line":39,"character":1}},"selectionRange":{"start":{"line":35,"character":1},"end":{"line":35,"character":20}}},{"name":"ConsistencyModeFast","detail":"ConsistencyMode","kind":14,"range":{"start":{"line":34,"character":0},"end":{"line":39,"character":1}},"selectionRange":{"start":{"line":36,"character":1},"end":{"line":36,"character":20}}},{"name":"ConsistencyModeBest","detail":"ConsistencyMode","kind":14,"range":{"start":{"line":34,"character":0},"end":{"line":39,"character":1}},"selectionRange":{"start":{"line":37,"character":1},"end":{"line":37,"character":20}}},{"name":"ConsistencyModeYOLO","detail":"ConsistencyMode","kind":14,"range":{"start":{"line":34,"character":0},"end":{"line":39,"character":1}},"selectionRange":{"start":{"line":38,"character":1},"end":{"line":38,"character":20}}},{"name":"Peer","detail":"interface{...}","kind":11,"range":{"start":{"line":43,"character":5},"end":{"line":47,"character":1}},"selectionRange":{"start":{"line":43,"character":5},"end":{"line":43,"character":9}},"children":[{"name":"Debug","kind":6,"range":{"start":{"line":44,"character":1},"end":{"line":44,"character":63}},"selectionRange":{"start":{"line":44,"character":1},"end":{"line":44,"character":6}}},{"name":"Exec","kind":6,"range":{"start":{"line":45,"character":1},"end":{"line":45,"character":80}},"selectionRange":{"start":{"line":45,"character":1},"end":{"line":45,"character":5}}},{"name":"Sync","kind":6,"range":{"start":{"line":46,"character":1},"end":{"line":46,"character":117}},"selectionRange":{"start":{"line":46,"character":1},"end":{"line":46,"character":5}}}]},{"name":"NopReadRepairs","detail":"*prometheus.CounterVec","kind":13,"range":{"start":{"line":49,"character":0},"end":{"line":53,"character":1}},"selectionRange":{"start":{"line":52,"character":1},"end":{"line":52,"character":15}}},{"name":"Node","detail":"struct{...}","kind":23,"range":{"start":{"line":57,"character":5},"end":{"line":61,"character":1}},"selectionRange":{"start":{"line":57,"character":5},"end":{"line":57,"character":9}},"children":[{"name":"peers","detail":"map[string]Peer","kind":8,"range":{"start":{"line":58,"character":1},"end":{"line":58,"character":28}},"selectionRange":{"start":{"line":58,"character":1},"end":{"line":58,"character":6}}},{"name":"ring","detail":"*ring","kind":8,"range":{"start":{"line":59,"character":1},"end":{"line":59,"character":18}},"selectionRange":{"start":{"line":59,"character":1},"end":{"line":59,"character":5}}},{"name":"readRepairs","detail":"*prometheus.CounterVec","kind":8,"range":{"start":{"line":60,"character":1},"end":{"line":60,"character":35}},"selectionRange":{"start":{"line":60,"character":1},"end":{"line":60,"character":12}}},{"name":"mustGetPeer","detail":"(node string)","kind":6,"range":{"start":{"line":82,"character":0},"end":{"line":88,"character":1}},"selectionRange":{"start":{"line":82,"character":15},"end":{"line":82,"character":26}}},{"name":"Debug","detail":"(ctx context.Context, op interface{})","kind":6,"range":{"start":{"line":93,"character":0},"end":{"line":130,"character":1}},"selectionRange":{"start":{"line":93,"character":15},"end":{"line":93,"character":20}}},{"name":"ExecMode","detail":"(ctx context.Context, realm string, id string, op interface{}, mode ConsistencyMode)","kind":6,"range":{"start":{"line":134,"character":0},"end":{"line":253,"character":1}},"selectionRange":{"start":{"line":134,"character":15},"end":{"line":134,"character":23}}},{"name":"Sync","detail":"(ctx context.Context, incoming map[object.RealmIDTag]replica.SyncRequest)","kind":6,"range":{"start":{"line":258,"character":0},"end":{"line":316,"character":1}},"selectionRange":{"start":{"line":258,"character":15},"end":{"line":258,"character":19}}}]},{"name":"NewNode","detail":"(peers map[string]Peer, replicationFactor int, readRepairs *prometheus.CounterVec)","kind":12,"range":{"start":{"line":65,"character":0},"end":{"line":76,"character":1}},"selectionRange":{"start":{"line":65,"character":5},"end":{"line":65,"character":12}}},{"name":"keyFor","detail":"(realm string, id string)","kind":12,"range":{"start":{"line":78,"character":0},"end":{"line":80,"character":1}},"selectionRange":{"start":{"line":78,"character":5},"end":{"line":78,"character":11}}},{"name":"mergeResponses","detail":"(dst *replica.SyncResponse, src replica.SyncResponse, req replica.SyncRequest)","kind":12,"range":{"start":{"line":322,"character":0},"end":{"line":343,"character":1}},"selectionRange":{"start":{"line":322,"character":5},"end":{"line":322,"character":19}}},{"name":"mergeUniqueValues","detail":"(existing [][]byte, incoming [][]byte)","kind":12,"range":{"start":{"line":345,"character":0},"end":{"line":356,"character":1}},"selectionRange":{"start":{"line":345,"character":5},"end":{"line":345,"character":22}}},{"name":"readRepair","detail":"(ctx context.Context, p Peer, obj object.Raw)","kind":12,"range":{"start":{"line":358,"character":0},"end":{"line":370,"character":1}},"selectionRange":{"start":{"line":358,"character":5},"end":{"line":358,"character":15}}},{"name":"aggregate","detail":"(individual []error)","kind":12,"range":{"start":{"line":372,"character":0},"end":{"line":393,"character":1}},"selectionRange":{"start":{"line":372,"character":5},"end":{"line":372,"character":14}}},{"name":"concat","detail":"(strs map[string]int)","kind":12,"range":{"start":{"line":395,"character":0},"end":{"line":411,"character":1}},"selectionRange":{"start":{"line":395,"character":5},"end":{"line":395,"character":11}}}] | |
[Trace - 10:20:10 AM] Sending notification 'textDocument/documentSymbol' in 249ms. | |
Params: {"textDocument":{"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/ring/node.go"}} | |
[Info - 10:20:10 AM] go/packages.Load | |
packages = 2 | |
[Trace - 10:20:10 AM] Received response 'textDocument/hover - (21)' in 0ms. | |
Params: {"contents":{"kind":"markdown","value":"```go\nfield readRepairs *prometheus.CounterVec\n```"},"range":{"start":{"line":74,"character":2},"end":{"line":74,"character":13}}} | |
[Trace - 10:20:10 AM] Sending notification 'textDocument/hover' in 243ms. | |
Params: {"textDocument":{"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/ring/node.go"},"position":{"line":74,"character":12}} | |
[Trace - 10:20:10 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/doc.go","diagnostics":[]} | |
[Trace - 10:20:10 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/middlewares.go","diagnostics":[]} | |
[Trace - 10:20:10 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/public.go","diagnostics":[{"range":{"start":{"line":16,"character":1},"end":{"line":16,"character":36}},"severity":1,"source":"LSP","message":"could not import github.com/fastly/REDACTED/pkg/auth (context canceled)"}]} | |
[Trace - 10:20:10 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/tls.go","diagnostics":[]} | |
[Trace - 10:20:10 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/util.go","diagnostics":[]} | |
[Info - 10:20:10 AM] go/packages.Load | |
package = github.com/fastly/REDACTED/pkg/api | |
files = [/Users/pbourgon/mod/REDACTED/pkg/api/debug.go /Users/pbourgon/mod/REDACTED/pkg/api/doc.go /Users/pbourgon/mod/REDACTED/pkg/api/internal.go /Users/pbourgon/mod/REDACTED/pkg/api/middlewares.go /Users/pbourgon/mod/REDACTED/pkg/api/public.go /Users/pbourgon/mod/REDACTED/pkg/api/tls.go /Users/pbourgon/mod/REDACTED/pkg/api/util.go] | |
[Trace - 10:20:10 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/tls_test.go","diagnostics":[{"range":{"start":{"line":201,"character":65},"end":{"line":201,"character":72}},"severity":1,"source":"LSP","message":"undeclared name: KeyPair"},{"range":{"start":{"line":210,"character":8},"end":{"line":210,"character":20}},"severity":1,"source":"LSP","message":"undeclared name: KeyPair"},{"range":{"start":{"line":22,"character":16},"end":{"line":22,"character":23}},"severity":1,"source":"LSP","message":"undeclared name: KeyPair"},{"range":{"start":{"line":23,"character":18},"end":{"line":23,"character":25}},"severity":1,"source":"LSP","message":"undeclared name: KeyPair"},{"range":{"start":{"line":24,"character":16},"end":{"line":24,"character":23}},"severity":1,"source":"LSP","message":"undeclared name: KeyPair"},{"range":{"start":{"line":25,"character":18},"end":{"line":25,"character":25}},"severity":1,"source":"LSP","message":"undeclared name: KeyPair"},{"range":{"start":{"line":31,"character":20},"end":{"line":31,"character":36}},"severity":1,"source":"LSP","message":"undeclared name: KeyPair"},{"range":{"start":{"line":33,"character":20},"end":{"line":33,"character":36}},"severity":1,"source":"LSP","message":"undeclared name: KeyPair"},{"range":{"start":{"line":39,"character":20},"end":{"line":39,"character":36}},"severity":1,"source":"LSP","message":"undeclared name: KeyPair"},{"range":{"start":{"line":41,"character":20},"end":{"line":41,"character":36}},"severity":1,"source":"LSP","message":"undeclared name: KeyPair"},{"range":{"start":{"line":47,"character":20},"end":{"line":47,"character":35}},"severity":1,"source":"LSP","message":"undeclared name: KeyPair"},{"range":{"start":{"line":49,"character":20},"end":{"line":49,"character":36}},"severity":1,"source":"LSP","message":"undeclared name: KeyPair"},{"range":{"start":{"line":55,"character":20},"end":{"line":55,"character":36}},"severity":1,"source":"LSP","message":"undeclared name: KeyPair"},{"range":{"start":{"line":57,"character":20},"end":{"line":57,"character":35}},"severity":1,"source":"LSP","message":"undeclared name: KeyPair"},{"range":{"start":{"line":63,"character":20},"end":{"line":63,"character":35}},"severity":1,"source":"LSP","message":"undeclared name: KeyPair"},{"range":{"start":{"line":65,"character":20},"end":{"line":65,"character":35}},"severity":1,"source":"LSP","message":"undeclared name: KeyPair"},{"range":{"start":{"line":71,"character":20},"end":{"line":71,"character":35}},"severity":1,"source":"LSP","message":"undeclared name: KeyPair"},{"range":{"start":{"line":73,"character":20},"end":{"line":73,"character":35}},"severity":1,"source":"LSP","message":"undeclared name: KeyPair"},{"range":{"start":{"line":79,"character":20},"end":{"line":79,"character":35}},"severity":1,"source":"LSP","message":"undeclared name: KeyPair"},{"range":{"start":{"line":81,"character":20},"end":{"line":81,"character":35}},"severity":1,"source":"LSP","message":"undeclared name: KeyPair"},{"range":{"start":{"line":87,"character":20},"end":{"line":87,"character":35}},"severity":1,"source":"LSP","message":"undeclared name: KeyPair"},{"range":{"start":{"line":89,"character":20},"end":{"line":89,"character":35}},"severity":1,"source":"LSP","message":"undeclared name: KeyPair"},{"range":{"start":{"line":95,"character":20},"end":{"line":95,"character":36}},"severity":1,"source":"LSP","message":"undeclared name: KeyPair"},{"range":{"start":{"line":97,"character":20},"end":{"line":97,"character":35}},"severity":1,"source":"LSP","message":"undeclared name: KeyPair"},{"range":{"start":{"line":103,"character":20},"end":{"line":103,"character":35}},"severity":1,"source":"LSP","message":"undeclared name: KeyPair"},{"range":{"start":{"line":105,"character":20},"end":{"line":105,"character":36}},"severity":1,"source":"LSP","message":"undeclared name: KeyPair"},{"range":{"start":{"line":111,"character":20},"end":{"line":111,"character":36}},"severity":1,"source":"LSP","message":"undeclared name: KeyPair"},{"range":{"start":{"line":113,"character":20},"end":{"line":113,"character":36}},"severity":1,"source":"LSP","message":"undeclared name: KeyPair"},{"range":{"start":{"line":119,"character":20},"end":{"line":119,"character":36}},"severity":1,"source":"LSP","message":"undeclared name: KeyPair"},{"range":{"start":{"line":121,"character":20},"end":{"line":121,"character":36}},"severity":1,"source":"LSP","message":"undeclared name: KeyPair"},{"range":{"start":{"line":127,"character":20},"end":{"line":127,"character":36}},"severity":1,"source":"LSP","message":"undeclared name: KeyPair"},{"range":{"start":{"line":129,"character":20},"end":{"line":129,"character":35}},"severity":1,"source":"LSP","message":"undeclared name: KeyPair"},{"range":{"start":{"line":135,"character":20},"end":{"line":135,"character":35}},"severity":1,"source":"LSP","message":"undeclared name: KeyPair"},{"range":{"start":{"line":137,"character":20},"end":{"line":137,"character":36}},"severity":1,"source":"LSP","message":"undeclared name: KeyPair"},{"range":{"start":{"line":143,"character":20},"end":{"line":143,"character":35}},"severity":1,"source":"LSP","message":"undeclared name: KeyPair"},{"range":{"start":{"line":145,"character":20},"end":{"line":145,"character":36}},"severity":1,"source":"LSP","message":"undeclared name: KeyPair"},{"range":{"start":{"line":151,"character":20},"end":{"line":151,"character":35}},"severity":1,"source":"LSP","message":"undeclared name: KeyPair"},{"range":{"start":{"line":153,"character":20},"end":{"line":153,"character":36}},"severity":1,"source":"LSP","message":"undeclared name: KeyPair"},{"range":{"start":{"line":159,"character":19},"end":{"line":159,"character":31}},"severity":1,"source":"LSP","message":"undeclared name: NewTLSServer"},{"range":{"start":{"line":168,"character":15},"end":{"line":168,"character":27}},"severity":1,"source":"LSP","message":"undeclared name: NewTLSClient"}]} | |
[Trace - 10:20:10 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/ring/doc.go","diagnostics":[]} | |
[Trace - 10:20:10 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/ring/ring.go","diagnostics":[]} | |
[Trace - 10:20:10 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/debug.go","diagnostics":[{"range":{"start":{"line":14,"character":1},"end":{"line":14,"character":36}},"severity":1,"source":"LSP","message":"could not import github.com/fastly/REDACTED/pkg/ring (context canceled)"}]} | |
[Trace - 10:20:10 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/internal.go","diagnostics":[]} | |
[Trace - 10:20:10 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/ring/node.go","diagnostics":[]} | |
[Error - 10:20:10 AM] failed to check package: context canceled | |
[Trace - 10:20:10 AM] Received response 'textDocument/documentLink - (22)' in 0ms. | |
Params: [{"range":{"start":{"line":3,"character":1},"end":{"line":3,"character":8}},"target":"https://godoc.org/bytes"},{"range":{"start":{"line":4,"character":1},"end":{"line":4,"character":10}},"target":"https://godoc.org/context"},{"range":{"start":{"line":5,"character":1},"end":{"line":5,"character":6}},"target":"https://godoc.org/fmt"},{"range":{"start":{"line":6,"character":1},"end":{"line":6,"character":11}},"target":"https://godoc.org/net/http"},{"range":{"start":{"line":7,"character":1},"end":{"line":7,"character":7}},"target":"https://godoc.org/sort"},{"range":{"start":{"line":8,"character":1},"end":{"line":8,"character":10}},"target":"https://godoc.org/strings"},{"range":{"start":{"line":10,"character":1},"end":{"line":10,"character":38}},"target":"https://godoc.org/github.com/fastly/REDACTED/pkg/errors"},{"range":{"start":{"line":11,"character":1},"end":{"line":11,"character":38}},"target":"https://godoc.org/github.com/fastly/REDACTED/pkg/object"},{"range":{"start":{"line":12,"character":1},"end":{"line":12,"character":39}},"target":"https://godoc.org/github.com/fastly/REDACTED/pkg/replica"},{"range":{"start":{"line":13,"character":1},"end":{"line":13,"character":49}},"target":"https://godoc.org/github.com/prometheus/client_golang/prometheus"}] | |
[Trace - 10:20:10 AM] Sending notification 'textDocument/documentLink' in 1ms. | |
Params: {"textDocument":{"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/ring/node.go"}} | |
[Trace - 10:20:11 AM] Received response 'textDocument/hover - (23)' in 0ms. | |
Params: {"contents":{"kind":"markdown","value":"```go\nfield readRepairs *prometheus.CounterVec\n```"},"range":{"start":{"line":74,"character":2},"end":{"line":74,"character":13}}} | |
[Trace - 10:20:11 AM] Sending notification 'textDocument/hover' in 0ms. | |
Params: {"textDocument":{"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/ring/node.go"},"position":{"line":74,"character":12}} | |
[Trace - 10:20:17 AM] Sending notification 'textDocument/didChange' in 0ms. | |
Params: {"textDocument":{"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/tls.go","version":5},"contentChanges":[{"range":{"start":{"line":4,"character":0},"end":{"line":64,"character":0}},"rangeLength":1836,"text":"\t\"crypto/tls\"\n\t\"io/ioutil\"\n\t\"log\"\n\t\"net\"\n\t\"net/http\"\n\t\"time\"\n\n\t\"github.com/fastly/fst-go/tlscfg\"\n\t\"github.com/fastly/REDACTED/pkg/errors\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\n// KeyPair combines a cert and a key.\ntype KeyPair struct {\n\tCert []byte\n\tKey []byte\n}\n\n// NewTLSServer returns an http.Server properly configured for mutual TLS auth.\n// Because the server can present multiple TLS key pairs, the ListenAndServe\n// helper will not work; callers should call server.Serve with the provided\n// net.Listener. Remember to clean up both the Server and the Listener.\nfunc NewTLSServer(netw, addr string, handler http.Handler, present KeyPair, accept []KeyPair) (*http.Server, net.Listener, error) {\n\topts := []tlscfg.Opt{\n\t\ttlscfg.WithKeyPair(present.Cert, present.Key),\n\t}\n\tfor _, keyPair := range accept {\n\t\topts = append(opts, tlscfg.WithCA(keyPair.Cert, tlscfg.ForServer))\n\t}\n\n\tcfg, err := tlscfg.New(opts...)\n\tif err != nil {\n\t\treturn nil, nil, errors.Wrap(err, \"error constructing TLS config for server\")\n\t}\n\n\tln, err := tls.Listen(netw, addr, cfg)\n\tif err != nil {\n\t\treturn nil, nil, errors.Wrap(err, \"error binding TLS listener\")\n\t}\n\n\treturn &http.Server{\n\t\tHandler: handler,\n\t\tTLSConfig: cfg,\n\t\tReadHeaderTimeout: 5 * time.Second,\n\t\tWriteTimeout: 10 * time.Second,\n\t\tIdleTimeout: 120 * time.Second,\n\t\tErrorLog: log.New(ioutil.Discard, \"\", 0),\n\t}, ln, nil\n}\n\n// NewTLSClient returns an http.Client properly configured for mutual TLS auth.\n// The transport will have MaxConnsPerHost and MaxIdleConnsPerHost set to\n// maxConns.\nfunc NewTLSClient(present KeyPair, accept []KeyPair, maxConns int, dials prometheus.Counter) (*http.Client, error) {\n\topts := []tlscfg.Opt{\n\t\ttlscfg.WithKeyPair(present.Cert, present.Key),\n\t}\n\tfor _, keyPair := range accept {\n\t\topts = append(opts, tlscfg.WithCA(keyPair.Cert, tlscfg.ForClient))\n\t}\n\n\tcfg, err := tlscfg.New(opts...)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"error constructing TLS config for client\")\n\t}\n\n\treturn &http.Client{\n\t\tTransport: &http.Transport{\n\t\t\tTLSClientConfig: cfg,\n\t\t\tMaxConnsPerHost: maxConns,\n\t\t\tMaxIdleConnsPerHost: maxConns,\n\t\t\tDialContext: func(ctx context.Context, netw, addr string) (net.Conn, error) {\n\t\t\t\tdials.Inc()\n\t\t\t\treturn zeroDialer.DialContext(ctx, netw, addr)\n\t\t\t},\n\t\t},\n\t}, nil\n}\n\n// NopDials may be passed to NewHTTPClient when dials don't need to be\n// tracked, in e.g. tests.\nvar NopDials = prometheus.NewCounter(prometheus.CounterOpts{\n\tName: \"nop_dials\",\n\tHelp: \"No-op dials.\",\n"}]} | |
[Info - 10:20:17 AM] 25.660302ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go "env" "GOMOD", stderr: <<>> | |
[Trace - 10:20:17 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"25.660302ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go \"env\" \"GOMOD\", stderr: \u003c\u003c\u003e\u003e\n"} | |
[Info - 10:20:17 AM] 52.546945ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go "list" "-m" "-json" "all", stderr: <<>> | |
[Trace - 10:20:17 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"52.546945ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go \"list\" \"-m\" \"-json\" \"all\", stderr: \u003c\u003c\u003e\u003e\n"} | |
[Info - 10:20:18 AM] 226.106554ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go "list" "-e" "-json" "-compiled=true" "-test=true" "-export=false" "-deps=true" "-find=false" "--" "/Users/pbourgon/mod/REDACTED/pkg/api", stderr: <<>> | |
[Trace - 10:20:18 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"226.106554ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go \"list\" \"-e\" \"-json\" \"-compiled=true\" \"-test=true\" \"-export=false\" \"-deps=true\" \"-find=false\" \"--\" \"/Users/pbourgon/mod/REDACTED/pkg/api\", stderr: \u003c\u003c\u003e\u003e\n"} | |
[Info - 10:20:18 AM] go/packages.Load | |
package = github.com/fastly/REDACTED/pkg/api | |
files = [/Users/pbourgon/mod/REDACTED/pkg/api/debug.go /Users/pbourgon/mod/REDACTED/pkg/api/doc.go /Users/pbourgon/mod/REDACTED/pkg/api/internal.go /Users/pbourgon/mod/REDACTED/pkg/api/middlewares.go /Users/pbourgon/mod/REDACTED/pkg/api/public.go /Users/pbourgon/mod/REDACTED/pkg/api/tls.go /Users/pbourgon/mod/REDACTED/pkg/api/util.go] | |
[Trace - 10:20:18 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"go/packages.Load\n\tpackage = github.com/fastly/REDACTED/pkg/api\n\tfiles = [/Users/pbourgon/mod/REDACTED/pkg/api/debug.go /Users/pbourgon/mod/REDACTED/pkg/api/doc.go /Users/pbourgon/mod/REDACTED/pkg/api/internal.go /Users/pbourgon/mod/REDACTED/pkg/api/middlewares.go /Users/pbourgon/mod/REDACTED/pkg/api/public.go /Users/pbourgon/mod/REDACTED/pkg/api/tls.go /Users/pbourgon/mod/REDACTED/pkg/api/util.go]"} | |
[Trace - 10:20:18 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"go/packages.Load\n\tpackages = 2"} | |
[Trace - 10:20:18 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"go/packages.Load\n\tpackage = github.com/fastly/REDACTED/pkg/api\n\tfiles = [/Users/pbourgon/mod/REDACTED/pkg/api/debug.go /Users/pbourgon/mod/REDACTED/pkg/api/doc.go /Users/pbourgon/mod/REDACTED/pkg/api/internal.go /Users/pbourgon/mod/REDACTED/pkg/api/middlewares.go /Users/pbourgon/mod/REDACTED/pkg/api/public.go /Users/pbourgon/mod/REDACTED/pkg/api/tls.go /Users/pbourgon/mod/REDACTED/pkg/api/util.go /Users/pbourgon/mod/REDACTED/pkg/api/tls_test.go]"} | |
[Info - 10:20:18 AM] go/packages.Load | |
packages = 2 | |
[Trace - 10:20:18 AM] Sending notification 'textDocument/didChange' in 276ms. | |
Params: {"textDocument":{"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/ring/node.go","version":5},"contentChanges":[{"range":{"start":{"line":52,"character":0},"end":{"line":53,"character":0}},"rangeLength":153,"text":"\tNopReadRepairs = prometheus.NewCounterVec(prometheus.CounterOpts{\n\t\tName: \"nop_read_repairs\",\n\t\tHelp: \"No-op read repairs.\",\n\t}, []string{\"target\", \"success\"})\n"}]} | |
[Info - 10:20:18 AM] go/packages.Load | |
package = github.com/fastly/REDACTED/pkg/api | |
files = [/Users/pbourgon/mod/REDACTED/pkg/api/debug.go /Users/pbourgon/mod/REDACTED/pkg/api/doc.go /Users/pbourgon/mod/REDACTED/pkg/api/internal.go /Users/pbourgon/mod/REDACTED/pkg/api/middlewares.go /Users/pbourgon/mod/REDACTED/pkg/api/public.go /Users/pbourgon/mod/REDACTED/pkg/api/tls.go /Users/pbourgon/mod/REDACTED/pkg/api/util.go /Users/pbourgon/mod/REDACTED/pkg/api/tls_test.go] | |
[Trace - 10:20:18 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":1,"message":"failed to check package: context canceled"} | |
[Error - 10:20:18 AM] failed to check package: context canceled | |
[Trace - 10:20:18 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":1,"message":"failed to compute diagnostics: no CheckPackageHandles for file:///Users/pbourgon/mod/REDACTED/pkg/api/tls.go\n\tfile = file:///Users/pbourgon/mod/REDACTED/pkg/api/tls.go"} | |
[Error - 10:20:18 AM] failed to compute diagnostics: no CheckPackageHandles for file:///Users/pbourgon/mod/REDACTED/pkg/api/tls.go | |
file = file:///Users/pbourgon/mod/REDACTED/pkg/api/tls.go | |
[Trace - 10:20:18 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":1,"message":"failed to check package: context canceled"} | |
[Error - 10:20:18 AM] failed to check package: context canceled | |
[Trace - 10:20:18 AM] Received response 'textDocument/codeAction - (24)' in 0ms. | |
Params: [{"title":"Organize Imports","kind":"source.organizeImports","edit":{"changes":{"file:///Users/pbourgon/mod/REDACTED/pkg/ring/node.go":[]}}}] | |
[Trace - 10:20:18 AM] Sending notification 'textDocument/codeAction' in 32ms. | |
Params: {"textDocument":{"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/ring/node.go"},"range":{"start":{"line":56,"character":0},"end":{"line":56,"character":0}},"context":{"diagnostics":[]}} | |
[Info - 10:20:18 AM] 23.132628ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go "env" "GOMOD", stderr: <<>> | |
[Trace - 10:20:18 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"23.132628ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go \"env\" \"GOMOD\", stderr: \u003c\u003c\u003e\u003e\n"} | |
[Info - 10:20:18 AM] 44.214777ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go "list" "-m" "-json" "all", stderr: <<>> | |
[Trace - 10:20:18 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"44.214777ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go \"list\" \"-m\" \"-json\" \"all\", stderr: \u003c\u003c\u003e\u003e\n"} | |
[Info - 10:20:18 AM] 221.904943ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go "list" "-e" "-json" "-compiled=true" "-test=true" "-export=false" "-deps=true" "-find=false" "--" "/Users/pbourgon/mod/REDACTED/pkg/api", stderr: <<>> | |
[Trace - 10:20:18 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"221.904943ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go \"list\" \"-e\" \"-json\" \"-compiled=true\" \"-test=true\" \"-export=false\" \"-deps=true\" \"-find=false\" \"--\" \"/Users/pbourgon/mod/REDACTED/pkg/api\", stderr: \u003c\u003c\u003e\u003e\n"} | |
[Info - 10:20:18 AM] go/packages.Load | |
packages = 2 | |
[Trace - 10:20:18 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"go/packages.Load\n\tpackages = 2"} | |
[Trace - 10:20:18 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"go/packages.Load\n\tpackage = github.com/fastly/REDACTED/pkg/api\n\tfiles = [/Users/pbourgon/mod/REDACTED/pkg/api/debug.go /Users/pbourgon/mod/REDACTED/pkg/api/doc.go /Users/pbourgon/mod/REDACTED/pkg/api/internal.go /Users/pbourgon/mod/REDACTED/pkg/api/middlewares.go /Users/pbourgon/mod/REDACTED/pkg/api/public.go /Users/pbourgon/mod/REDACTED/pkg/api/tls.go /Users/pbourgon/mod/REDACTED/pkg/api/util.go /Users/pbourgon/mod/REDACTED/pkg/api/tls_test.go]"} | |
[Trace - 10:20:18 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"go/packages.Load\n\tpackage = github.com/fastly/REDACTED/pkg/api\n\tfiles = [/Users/pbourgon/mod/REDACTED/pkg/api/debug.go /Users/pbourgon/mod/REDACTED/pkg/api/doc.go /Users/pbourgon/mod/REDACTED/pkg/api/internal.go /Users/pbourgon/mod/REDACTED/pkg/api/middlewares.go /Users/pbourgon/mod/REDACTED/pkg/api/public.go /Users/pbourgon/mod/REDACTED/pkg/api/tls.go /Users/pbourgon/mod/REDACTED/pkg/api/util.go]"} | |
[Trace - 10:20:18 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/tls.go","diagnostics":[]} | |
[Trace - 10:20:18 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/util.go","diagnostics":[]} | |
[Trace - 10:20:18 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/ring/doc.go","diagnostics":[]} | |
[Trace - 10:20:18 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/ring/node.go","diagnostics":[]} | |
[Trace - 10:20:18 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/doc.go","diagnostics":[]} | |
[Trace - 10:20:18 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/public.go","diagnostics":[]} | |
[Trace - 10:20:18 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/ring/ring.go","diagnostics":[]} | |
[Trace - 10:20:18 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/debug.go","diagnostics":[{"range":{"start":{"line":14,"character":1},"end":{"line":14,"character":36}},"severity":1,"source":"LSP","message":"could not import github.com/fastly/REDACTED/pkg/ring (context canceled)"}]} | |
[Trace - 10:20:18 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/internal.go","diagnostics":[]} | |
[Trace - 10:20:18 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/middlewares.go","diagnostics":[]} | |
[Trace - 10:20:18 AM] Received response 'textDocument/documentSymbol - (25)' in 0ms. | |
Params: [{"name":"ErrNoNodesFound","detail":"errors.Error","kind":13,"range":{"start":{"line":17,"character":0},"end":{"line":17,"character":87}},"selectionRange":{"start":{"line":17,"character":4},"end":{"line":17,"character":19}}},{"name":"ConsistencyMode","detail":"uint8","kind":16,"range":{"start":{"line":21,"character":5},"end":{"line":21,"character":26}},"selectionRange":{"start":{"line":21,"character":5},"end":{"line":21,"character":20}}},{"name":"ConsistencyModeSafe","detail":"ConsistencyMode","kind":14,"range":{"start":{"line":34,"character":0},"end":{"line":39,"character":1}},"selectionRange":{"start":{"line":35,"character":1},"end":{"line":35,"character":20}}},{"name":"ConsistencyModeFast","detail":"ConsistencyMode","kind":14,"range":{"start":{"line":34,"character":0},"end":{"line":39,"character":1}},"selectionRange":{"start":{"line":36,"character":1},"end":{"line":36,"character":20}}},{"name":"ConsistencyModeBest","detail":"ConsistencyMode","kind":14,"range":{"start":{"line":34,"character":0},"end":{"line":39,"character":1}},"selectionRange":{"start":{"line":37,"character":1},"end":{"line":37,"character":20}}},{"name":"ConsistencyModeYOLO","detail":"ConsistencyMode","kind":14,"range":{"start":{"line":34,"character":0},"end":{"line":39,"character":1}},"selectionRange":{"start":{"line":38,"character":1},"end":{"line":38,"character":20}}},{"name":"Peer","detail":"interface{...}","kind":11,"range":{"start":{"line":43,"character":5},"end":{"line":47,"character":1}},"selectionRange":{"start":{"line":43,"character":5},"end":{"line":43,"character":9}},"children":[{"name":"Debug","kind":6,"range":{"start":{"line":44,"character":1},"end":{"line":44,"character":63}},"selectionRange":{"start":{"line":44,"character":1},"end":{"line":44,"character":6}}},{"name":"Exec","kind":6,"range":{"start":{"line":45,"character":1},"end":{"line":45,"character":80}},"selectionRange":{"start":{"line":45,"character":1},"end":{"line":45,"character":5}}},{"name":"Sync","kind":6,"range":{"start":{"line":46,"character":1},"end":{"line":46,"character":117}},"selectionRange":{"start":{"line":46,"character":1},"end":{"line":46,"character":5}}}]},{"name":"NopReadRepairs","detail":"*prometheus.CounterVec","kind":13,"range":{"start":{"line":49,"character":0},"end":{"line":56,"character":1}},"selectionRange":{"start":{"line":52,"character":1},"end":{"line":52,"character":15}}},{"name":"Node","detail":"struct{...}","kind":23,"range":{"start":{"line":60,"character":5},"end":{"line":64,"character":1}},"selectionRange":{"start":{"line":60,"character":5},"end":{"line":60,"character":9}},"children":[{"name":"peers","detail":"map[string]Peer","kind":8,"range":{"start":{"line":61,"character":1},"end":{"line":61,"character":28}},"selectionRange":{"start":{"line":61,"character":1},"end":{"line":61,"character":6}}},{"name":"ring","detail":"*ring","kind":8,"range":{"start":{"line":62,"character":1},"end":{"line":62,"character":18}},"selectionRange":{"start":{"line":62,"character":1},"end":{"line":62,"character":5}}},{"name":"readRepairs","detail":"*prometheus.CounterVec","kind":8,"range":{"start":{"line":63,"character":1},"end":{"line":63,"character":35}},"selectionRange":{"start":{"line":63,"character":1},"end":{"line":63,"character":12}}},{"name":"ExecMode","detail":"(ctx context.Context, realm string, id string, op interface{}, mode ConsistencyMode)","kind":6,"range":{"start":{"line":137,"character":0},"end":{"line":256,"character":1}},"selectionRange":{"start":{"line":137,"character":15},"end":{"line":137,"character":23}}},{"name":"Sync","detail":"(ctx context.Context, incoming map[object.RealmIDTag]replica.SyncRequest)","kind":6,"range":{"start":{"line":261,"character":0},"end":{"line":319,"character":1}},"selectionRange":{"start":{"line":261,"character":15},"end":{"line":261,"character":19}}},{"name":"mustGetPeer","detail":"(node string)","kind":6,"range":{"start":{"line":85,"character":0},"end":{"line":91,"character":1}},"selectionRange":{"start":{"line":85,"character":15},"end":{"line":85,"character":26}}},{"name":"Debug","detail":"(ctx context.Context, op interface{})","kind":6,"range":{"start":{"line":96,"character":0},"end":{"line":133,"character":1}},"selectionRange":{"start":{"line":96,"character":15},"end":{"line":96,"character":20}}}]},{"name":"NewNode","detail":"(peers map[string]Peer, replicationFactor int, readRepairs *prometheus.CounterVec)","kind":12,"range":{"start":{"line":68,"character":0},"end":{"line":79,"character":1}},"selectionRange":{"start":{"line":68,"character":5},"end":{"line":68,"character":12}}},{"name":"keyFor","detail":"(realm string, id string)","kind":12,"range":{"start":{"line":81,"character":0},"end":{"line":83,"character":1}},"selectionRange":{"start":{"line":81,"character":5},"end":{"line":81,"character":11}}},{"name":"mergeResponses","detail":"(dst *replica.SyncResponse, src replica.SyncResponse, req replica.SyncRequest)","kind":12,"range":{"start":{"lin[Info - 10:20:18 AM] go/packages.Load | |
package = github.com/fastly/REDACTED/pkg/api | |
files = [/Users/pbourgon/mod/REDACTED/pkg/api/debug.go /Users/pbourgon/mod/REDACTED/pkg/api/doc.go /Users/pbourgon/mod/REDACTED/pkg/api/internal.go /Users/pbourgon/mod/REDACTED/pkg/api/middlewares.go /Users/pbourgon/mod/REDACTED/pkg/api/public.go /Users/pbourgon/mod/REDACTED/pkg/api/tls.go /Users/pbourgon/mod/REDACTED/pkg/api/util.go /Users/pbourgon/mod/REDACTED/pkg/api/tls_test.go] | |
e":325,"character":0},"end":{"line":346,"character":1}},"selectionRange":{"start":{"line":325,"character":5},"end":{"line":325,"character":19}}},{"name":"mergeUniqueValues","detail":"(existing [][]byte, incoming [][]byte)","kind":12,"range":{"start":{"line":348,"character":0},"end":{"line":359,"character":1}},"selectionRange":{"start":{"line":348,"character":5},"end":{"line":348,"character":22}}},{"name":"readRepair","detail":"(ctx context.Context, p Peer, obj object.Raw)","kind":12,"range":{"start":{"line":361,"character":0},"end":{"line":373,"character":1}},"selectionRange":{"start":{"line":361,"character":5},"end":{"line":361,"character":15}}},{"name":"aggregate","detail":"(individual []error)","kind":12,"range":{"start":{"line":375,"character":0},"end":{"line":396,"character":1}},"selectionRange":{"start":{"line":375,"character":5},"end":{"line":375,"character":14}}},{"name":"concat","detail":"(strs map[string]int)","kind":12,"range":{"start":{"line":398,"character":0},"end":{"line":414,"character":1}},"selectionRange":{"start":{"line":398,"character":5},"end":{"line":398,"character":11}}}] | |
[Trace - 10:20:18 AM] Sending notification 'textDocument/documentSymbol' in 203ms. | |
Params: {"textDocument":{"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/ring/node.go"}} | |
[Trace - 10:20:18 AM] Received response 'textDocument/hover - (26)' in 0ms. | |
Params: {"contents":{"kind":"markdown","value":"Node in a consistent hash ring.\n```go\nNode struct {\n\tpeers map[string]Peer\n\tring *ring\n\treadRepairs *prometheus.CounterVec\n}\n```"},"range":{"start":{"line":74,"character":9},"end":{"line":74,"character":13}}} | |
[Trace - 10:20:18 AM] Sending notification 'textDocument/hover' in 189ms. | |
Params: {"textDocument":{"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/ring/node.go"},"position":{"line":74,"character":12}} | |
[Info - 10:20:18 AM] go/packages.Load | |
package = github.com/fastly/REDACTED/pkg/api | |
files = [/Users/pbourgon/mod/REDACTED/pkg/api/debug.go /Users/pbourgon/mod/REDACTED/pkg/api/doc.go /Users/pbourgon/mod/REDACTED/pkg/api/internal.go /Users/pbourgon/mod/REDACTED/pkg/api/middlewares.go /Users/pbourgon/mod/REDACTED/pkg/api/public.go /Users/pbourgon/mod/REDACTED/pkg/api/tls.go /Users/pbourgon/mod/REDACTED/pkg/api/util.go] | |
[Trace - 10:20:18 AM] Received response 'textDocument/documentLink - (27)' in 0ms. | |
Params: [{"range":{"start":{"line":3,"character":1},"end":{"line":3,"character":8}},"target":"https://godoc.org/bytes"},{"range":{"start":{"line":4,"character":1},"end":{"line":4,"character":10}},"target":"https://godoc.org/context"},{"range":{"start":{"line":5,"character":1},"end":{"line":5,"character":6}},"target":"https://godoc.org/fmt"},{"range":{"start":{"line":6,"character":1},"end":{"line":6,"character":11}},"target":"https://godoc.org/net/http"},{"range":{"start":{"line":7,"character":1},"end":{"line":7,"character":7}},"target":"https://godoc.org/sort"},{"range":{"start":{"line":8,"character":1},"end":{"line":8,"character":10}},"target":"https://godoc.org/strings"},{"range":{"start":{"line":10,"character":1},"end":{"line":10,"character":38}},"target":"https://godoc.org/github.com/fastly/REDACTED/pkg/errors"},{"range":{"start":{"line":11,"character":1},"end":{"line":11,"character":38}},"target":"https://godoc.org/github.com/fastly/REDACTED/pkg/object"},{"range":{"start":{"line":12,"character":1},"end":{"line":12,"character":39}},"target":"https://godoc.org/github.com/fastly/REDACTED/pkg/replica"},{"range":{"start":{"line":13,"character":1},"end":{"line":13,"character":49}},"target":"https://godoc.org/github.com/prometheus/client_golang/prometheus"}] | |
[Trace - 10:20:18 AM] Sending notification 'textDocument/documentLink' in 1ms. | |
Params: {"textDocument":{"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/ring/node.go"}} | |
[Trace - 10:20:19 AM] Received response 'textDocument/hover - (28)' in 0ms. | |
Params: {"contents":{"kind":"markdown","value":"Node in a consistent hash ring.\n```go\nNode struct {\n\tpeers map[string]Peer\n\tring *ring\n\treadRepairs *prometheus.CounterVec\n}\n```"},"range":{"start":{"line":74,"character":9},"end":{"line":74,"character":13}}} | |
[Trace - 10:20:19 AM] Sending notification 'textDocument/hover' in 0ms. | |
Params: {"textDocument":{"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/ring/node.go"},"position":{"line":74,"character":12}} | |
[Trace - 10:23:55 AM] Sending notification 'textDocument/didChange' in 1ms. | |
Params: {"textDocument":{"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/tls.go","version":6},"contentChanges":[{"range":{"start":{"line":4,"character":0},"end":{"line":88,"character":0}},"rangeLength":2537,"text":"\t\"io/ioutil\"\n\t\"log\"\n\t\"net\"\n\t\"net/http\"\n\t\"time\"\n\n\t\"github.com/fastly/fst-go/tlscfg\"\n\t\"github.com/fastly/REDACTED/pkg/errors\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\n// NewHTTPServer returns an http.Server properly configured for mutual TLS auth.\nfunc NewHTTPServer(addr string, handler http.Handler, cert, key []byte) (*http.Server, error) {\n\tcfg, err := tlscfg.New(\n\t\ttlscfg.WithKeyPair(cert, key),\n\t\ttlscfg.WithCA(cert, tlscfg.ForServer),\n\t)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"error constructing TLS config for server\")\n\t}\n\treturn &http.Server{\n\t\tAddr: addr,\n\t\tHandler: handler,\n\t\tTLSConfig: cfg,\n\t\tReadHeaderTimeout: 5 * time.Second,\n\t\tWriteTimeout: 10 * time.Second,\n\t\tIdleTimeout: 120 * time.Second,\n\t\tErrorLog: log.New(ioutil.Discard, \"\", 0),\n\t}, nil\n}\n\n// NewHTTPClient returns an http.Client properly configured for mutual TLS auth.\n// The transport will have MaxConnsPerHost and MaxIdleConnsPerHost set to\n// maxConns.\nfunc NewHTTPClient(cert, key []byte, maxConns int, dials prometheus.Counter) (*http.Client, error) {\n\tcfg, err := tlscfg.New(\n\t\ttlscfg.WithKeyPair(cert, key),\n\t\ttlscfg.WithCA(cert, tlscfg.ForClient),\n\t)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"error constructing TLS config for client\")\n\t}\n\treturn &http.Client{\n\t\tTransport: &http.Transport{\n\t\t\tTLSClientConfig: cfg,\n\t\t\tMaxConnsPerHost: maxConns,\n\t\t\tMaxIdleConnsPerHost: maxConns,\n\t\t\tDialContext: func(ctx context.Context, netw, addr string) (net.Conn, error) {\n\t\t\t\tdials.Inc()\n\t\t\t\treturn zeroDialer.DialContext(ctx, netw, addr)\n\t\t\t},\n\t\t},\n\t}, nil\n}\n\n// NopDials may be passed to NewHTTPClient when dials don't need to be\n// tracked, in e.g. tests.\nvar NopDials = prometheus.NewCounter(prometheus.CounterOpts{\n\tName: \"nop_read_repairs\",\n\tHelp: \"No-op read repairs.\",\n"}]} | |
[Info - 10:23:55 AM] 34.633108ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go "env" "GOMOD", stderr: <<>> | |
[Trace - 10:23:55 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"34.633108ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go \"env\" \"GOMOD\", stderr: \u003c\u003c\u003e\u003e\n"} | |
[Trace - 10:23:55 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"52.455358ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go \"list\" \"-m\" \"-json\" \"all\", stderr: \u003c\u003c\u003e\u003e\n"} | |
[Info - 10:23:55 AM] 52.455358ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go "list" "-m" "-json" "all", stderr: <<>> | |
[Info - 10:23:55 AM] 230.045252ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go "list" "-e" "-json" "-compiled=true" "-test=true" "-export=false" "-deps=true" "-find=false" "--" "/Users/pbourgon/mod/REDACTED/pkg/api", stderr: <<>> | |
[Trace - 10:23:55 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"230.045252ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go \"list\" \"-e\" \"-json\" \"-compiled=true\" \"-test=true\" \"-export=false\" \"-deps=true\" \"-find=false\" \"--\" \"/Users/pbourgon/mod/REDACTED/pkg/api\", stderr: \u003c\u003c\u003e\u003e\n"} | |
[Trace - 10:23:55 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"go/packages.Load\n\tpackages = 2"} | |
[Trace - 10:23:55 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"go/packages.Load\n\tpackage = github.com/fastly/REDACTED/pkg/api\n\tfiles = [/Users/pbourgon/mod/REDACTED/pkg/api/debug.go /Users/pbourgon/mod/REDACTED/pkg/api/doc.go /Users/pbourgon/mod/REDACTED/pkg/api/internal.go /Users/pbourgon/mod/REDACTED/pkg/api/middlewares.go /Users/pbourgon/mod/REDACTED/pkg/api/public.go /Users/pbourgon/mod/REDACTED/pkg/api/tls.go /Users/pbourgon/mod/REDACTED/pkg/api/util.go /Users/pbourgon/mod/REDACTED/pkg/api/tls_test.go]"} | |
[Trace - 10:23:55 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"go/packages.Load\n\tpackage = github.com/fastly/REDACTED/pkg/api\n\tfiles = [/Users/pbourgon/mod/REDACTED/pkg/api/debug.go /Users/pbourgon/mod/REDACTED/pkg/api/doc.go /Users/pbourgon/mod/REDACTED/pkg/api/internal.go /Users/pbourgon/mod/REDACTED/pkg/api/middlewares.go /Users/pbourgon/mod/REDACTED/pkg/api/public.go /Users/pbourgon/mod/REDACTED/pkg/api/tls.go /Users/pbourgon/mod/REDACTED/pkg/api/util.go]"} | |
[Info - 10:23:55 AM] go/packages.Load | |
packages = 2 | |
[Info - 10:23:55 AM] go/packages.Load | |
package = github.com/fastly/REDACTED/pkg/api | |
files = [/Users/pbourgon/mod/REDACTED/pkg/api/debug.go /Users/pbourgon/mod/REDACTED/pkg/api/doc.go /Users/pbourgon/mod/REDACTED/pkg/api/internal.go /Users/pbourgon/mod/REDACTED/pkg/api/middlewares.go /Users/pbourgon/mod/REDACTED/pkg/api/public.go /Users/pbourgon/mod/REDACTED/pkg/api/tls.go /Users/pbourgon/mod/REDACTED/pkg/api/util.go /Users/pbourgon/mod/REDACTED/pkg/api/tls_test.go] | |
[Info - 10:23:55 AM] go/packages.Load | |
package = github.com/fastly/REDACTED/pkg/api | |
files = [/Users/pbourgon/mod/REDACTED/pkg/api/debug.go /Users/pbourgon/mod/REDACTED/pkg/api/doc.go /Users/pbourgon/mod/REDACTED/pkg/api/internal.go /Users/pbourgon/mod/REDACTED/pkg/api/middlewares.go /Users/pbourgon/mod/REDACTED/pkg/api/public.go /Users/pbourgon/mod/REDACTED/pkg/api/tls.go /Users/pbourgon/mod/REDACTED/pkg/api/util.go] | |
[Trace - 10:23:55 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/util.go","diagnostics":[]} | |
[Trace - 10:23:55 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/debug.go","diagnostics":[]} | |
[Trace - 10:23:55 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/doc.go","diagnostics":[]} | |
[Trace - 10:23:55 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/internal.go","diagnostics":[]} | |
[Trace - 10:23:55 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/middlewares.go","diagnostics":[]} | |
[Trace - 10:23:55 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/public.go","diagnostics":[{"range":{"start":{"line":55,"character":13},"end":{"line":55,"character":13}},"severity":1,"source":"LSP","message":"cannot use (*auth.Node)(nil) (value of type *auth.Node) as Auth value in variable declaration: wrong type for method ExecMode"}]} | |
[Trace - 10:23:55 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/tls.go","diagnostics":[]} | |
[Trace - 10:24:04 AM] Sending notification 'textDocument/didChange' in 1ms. | |
Params: {"textDocument":{"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/tls.go","version":7},"contentChanges":[{"range":{"start":{"line":4,"character":0},"end":{"line":64,"character":0}},"rangeLength":1836,"text":"\t\"crypto/tls\"\n\t\"io/ioutil\"\n\t\"log\"\n\t\"net\"\n\t\"net/http\"\n\t\"time\"\n\n\t\"github.com/fastly/fst-go/tlscfg\"\n\t\"github.com/fastly/REDACTED/pkg/errors\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\n// KeyPair combines a cert and a key.\ntype KeyPair struct {\n\tCert []byte\n\tKey []byte\n}\n\n// NewTLSServer returns an http.Server properly configured for mutual TLS auth.\n// Because the server can present multiple TLS key pairs, the ListenAndServe\n// helper will not work; callers should call server.Serve with the provided\n// net.Listener. Remember to clean up both the Server and the Listener.\nfunc NewTLSServer(netw, addr string, handler http.Handler, present KeyPair, accept []KeyPair) (*http.Server, net.Listener, error) {\n\topts := []tlscfg.Opt{\n\t\ttlscfg.WithKeyPair(present.Cert, present.Key),\n\t}\n\tfor _, keyPair := range accept {\n\t\topts = append(opts, tlscfg.WithCA(keyPair.Cert, tlscfg.ForServer))\n\t}\n\n\tcfg, err := tlscfg.New(opts...)\n\tif err != nil {\n\t\treturn nil, nil, errors.Wrap(err, \"error constructing TLS config for server\")\n\t}\n\n\tln, err := tls.Listen(netw, addr, cfg)\n\tif err != nil {\n\t\treturn nil, nil, errors.Wrap(err, \"error binding TLS listener\")\n\t}\n\n\treturn &http.Server{\n\t\tHandler: handler,\n\t\tTLSConfig: cfg,\n\t\tReadHeaderTimeout: 5 * time.Second,\n\t\tWriteTimeout: 10 * time.Second,\n\t\tIdleTimeout: 120 * time.Second,\n\t\tErrorLog: log.New(ioutil.Discard, \"\", 0),\n\t}, ln, nil\n}\n\n// NewTLSClient returns an http.Client properly configured for mutual TLS auth.\n// The transport will have MaxConnsPerHost and MaxIdleConnsPerHost set to\n// maxConns.\nfunc NewTLSClient(present KeyPair, accept []KeyPair, maxConns int, dials prometheus.Counter) (*http.Client, error) {\n\topts := []tlscfg.Opt{\n\t\ttlscfg.WithKeyPair(present.Cert, present.Key),\n\t}\n\tfor _, keyPair := range accept {\n\t\topts = append(opts, tlscfg.WithCA(keyPair.Cert, tlscfg.ForClient))\n\t}\n\n\tcfg, err := tlscfg.New(opts...)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"error constructing TLS config for client\")\n\t}\n\n\treturn &http.Client{\n\t\tTransport: &http.Transport{\n\t\t\tTLSClientConfig: cfg,\n\t\t\tMaxConnsPerHost: maxConns,\n\t\t\tMaxIdleConnsPerHost: maxConns,\n\t\t\tDialContext: func(ctx context.Context, netw, addr string) (net.Conn, error) {\n\t\t\t\tdials.Inc()\n\t\t\t\treturn zeroDialer.DialContext(ctx, netw, addr)\n\t\t\t},\n\t\t},\n\t}, nil\n}\n\n// NopDials may be passed to NewHTTPClient when dials don't need to be\n// tracked, in e.g. tests.\nvar NopDials = prometheus.NewCounter(prometheus.CounterOpts{\n\tName: \"nop_dials\",\n\tHelp: \"No-op dials.\",\n"}]} | |
[Info - 10:24:04 AM] 39.490973ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go "env" "GOMOD", stderr: <<>> | |
[Trace - 10:24:04 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"39.490973ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go \"env\" \"GOMOD\", stderr: \u003c\u003c\u003e\u003e\n"} | |
[Info - 10:24:04 AM] 55.574154ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go "list" "-m" "-json" "all", stderr: <<>> | |
[Trace - 10:24:04 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"55.574154ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go \"list\" \"-m\" \"-json\" \"all\", stderr: \u003c\u003c\u003e\u003e\n"} | |
[Info - 10:24:05 AM] 223.809683ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go "list" "-e" "-json" "-compiled=true" "-test=true" "-export=false" "-deps=true" "-find=false" "--" "/Users/pbourgon/mod/REDACTED/pkg/api", stderr: <<>> | |
[Trace - 10:24:05 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"223.809683ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go \"list\" \"-e\" \"-json\" \"-compiled=true\" \"-test=true\" \"-export=false\" \"-deps=true\" \"-find=false\" \"--\" \"/Users/pbourgon/mod/REDACTED/pkg/api\", stderr: \u003c\u003c\u003e\u003e\n"} | |
[Info - 10:24:05 AM] go/packages.Load | |
packages = 2 | |
[Trace - 10:24:05 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"go/packages.Load\n\tpackages = 2"} | |
[Trace - 10:24:05 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"go/packages.Load\n\tpackage = github.com/fastly/REDACTED/pkg/api\n\tfiles = [/Users/pbourgon/mod/REDACTED/pkg/api/debug.go /Users/pbourgon/mod/REDACTED/pkg/api/doc.go /Users/pbourgon/mod/REDACTED/pkg/api/internal.go /Users/pbourgon/mod/REDACTED/pkg/api/middlewares.go /Users/pbourgon/mod/REDACTED/pkg/api/public.go /Users/pbourgon/mod/REDACTED/pkg/api/tls.go /Users/pbourgon/mod/REDACTED/pkg/api/util.go]"} | |
[Trace - 10:24:05 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"go/packages.Load\n\tpackage = github.com/fastly/REDACTED/pkg/api\n\tfiles = [/Users/pbourgon/mod/REDACTED/pkg/api/debug.go /Users/pbourgon/mod/REDACTED/pkg/api/doc.go /Users/pbourgon/mod/REDACTED/pkg/api/internal.go /Users/pbourgon/mod/REDACTED/pkg/api/middlewares.go /Users/pbourgon/mod/REDACTED/pkg/api/public.go /Users/pbourgon/mod/REDACTED/pkg/api/tls.go /Users/pbourgon/mod/REDACTED/pkg/api/util.go /Users/pbourgon/mod/REDACTED/pkg/api/tls_test.go]"} | |
[Info - 10:24:05 AM] go/packages.Load | |
package = github.com/fastly/REDACTED/pkg/api | |
files = [/Users/pbourgon/mod/REDACTED/pkg/api/debug.go /Users/pbourgon/mod/REDACTED/pkg/api/doc.go /Users/pbourgon/mod/REDACTED/pkg/api/internal.go /Users/pbourgon/mod/REDACTED/pkg/api/middlewares.go /Users/pbourgon/mod/REDACTED/pkg/api/public.go /Users/pbourgon/mod/REDACTED/pkg/api/tls.go /Users/pbourgon/mod/REDACTED/pkg/api/util.go] | |
[Info - 10:24:05 AM] go/packages.Load | |
package = github.com/fastly/REDACTED/pkg/api | |
files = [/Users/pbourgon/mod/REDACTED/pkg/api/debug.go /Users/pbourgon/mod/REDACTED/pkg/api/doc.go /Users/pbourgon/mod/REDACTED/pkg/api/internal.go /Users/pbourgon/mod/REDACTED/pkg/api/middlewares.go /Users/pbourgon/mod/REDACTED/pkg/api/public.go /Users/pbourgon/mod/REDACTED/pkg/api/tls.go /Users/pbourgon/mod/REDACTED/pkg/api/util.go /Users/pbourgon/mod/REDACTED/pkg/api/tls_test.go] | |
[Trace - 10:24:05 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/debug.go","diagnostics":[]} | |
[Trace - 10:24:05 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/doc.go","diagnostics":[]} | |
[Trace - 10:24:05 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/internal.go","diagnostics":[]} | |
[Trace - 10:24:05 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/middlewares.go","diagnostics":[]} | |
[Trace - 10:24:05 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/public.go","diagnostics":[{"range":{"start":{"line":55,"character":13},"end":{"line":55,"character":13}},"severity":1,"source":"LSP","message":"cannot use (*auth.Node)(nil) (value of type *auth.Node) as Auth value in variable declaration: wrong type for method ExecMode"}]} | |
[Trace - 10:24:05 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/tls.go","diagnostics":[]} | |
[Trace - 10:24:05 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/util.go","diagnostics":[]} | |
[Trace - 10:27:37 AM] Received response 'textDocument/codeAction - (29)' in 0ms. | |
Params: [{"title":"Organize Imports","kind":"source.organizeImports","edit":{"changes":{"file:///Users/pbourgon/mod/REDACTED/pkg/ring/node.go":[]}}}] | |
[Trace - 10:27:37 AM] Sending notification 'textDocument/codeAction' in 7ms. | |
Params: {"textDocument":{"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/ring/node.go"},"range":{"start":{"line":53,"character":27},"end":{"line":53,"character":27}},"context":{"diagnostics":[]}} | |
[Trace - 10:27:43 AM] Sending notification 'textDocument/didOpen' in 1ms. | |
Params: {"textDocument":{"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/public.go","languageId":"go","version":1,"text":"package api\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"encoding/base64\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"mime\"\n\t\"mime/multipart\"\n\t\"net/http\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/fastly/REDACTED/pkg/auth\"\n\t\"github.com/fastly/REDACTED/pkg/errors\"\n\t\"github.com/fastly/REDACTED/pkg/object\"\n\t\"github.com/fastly/REDACTED/pkg/replica\"\n\t\"github.com/fastly/REDACTED/pkg/ring\"\n\t\"github.com/gorilla/mux\"\n)\n\nconst (\n\t// LimitRemainingHeaderKey is a response header that contains the remaining\n\t// capacity of a limiter.\n\tLimitRemainingHeaderKey = \"Fastly-Limit-Remaining\" // TODO(pb)\n\n\t// CausalContextHeaderKey is a request and response header that contains the\n\t// opaque context (dotted version vector set) for multi-value register API\n\t// calls.\n\tCausalContextHeaderKey = \"Fastly-Causal-Context\" // TODO(pb)\n\n\t// LWWTimestampKey is a response header that contains the lexicographical\n\t// timestamp string associated with a LWWRegister value.\n\tLWWTimestampKey = \"Fastly-LWW-Timestamp\"\n\n\t// MaxObjectSizeBytes is the maximum request body size that will be accepted\n\t// in a PUT to a register. The value has been chosen arbitrarily.\n\tMaxObjectSizeBytes = 10 * 1024 * 1024 // 10MB\n\n\t// MaxItemSizeBytes is the maximum request body size that will be accepted\n\t// for an item added to a HyperLogLog. The value has been chosen\n\t// arbitrarily.\n\tMaxItemSizeBytes = 100 * 1024 // 100KB\n)\n\n// Auth enumerates the methods required by the public API, modeling part of an\n// auth.Node. It's a consumer contract for the PublicServer.\ntype Auth interface {\n\tExecMode(ctx context.Context, token, id string, op interface{}, mode ring.ConsistencyMode) (object.Raw, error)\n}\n\n// Assert that the Auth interface is implemented by auth.Node.\nvar _ Auth = (*auth.Node)(nil)\n\n//\n//\n//\n\n// PublicServer wraps an Auth instance (e.g. an auth.Node) and implements the\n// public API HTTP endpoints. PublicServer has no corresponding PublicClient,\n// because the only consumers of this interface are, presumably, actual users.\ntype PublicServer struct {\n\tauth Auth\n\thttp.Handler\n}\n\n// NewPublicServer wraps the provided Public instance and makes it available over HTTP.\nfunc NewPublicServer(a Auth) *PublicServer {\n\ts := &PublicServer{auth: a}\n\tr := mux.NewRouter()\n\tr.StrictSlash(true)\n\tr.Path(\"/limit/{id:[^/]+}/{capacity:[0-9]+}/{window:[^/]+}\").Methods(\"POST\").HandlerFunc(s.handleLimit)\n\tr.Path(\"/value/{id:[^/]+}\").Methods(\"PUT\").HandlerFunc(s.handleSinglePut)\n\tr.Path(\"/value/{id:[^/]+}\").Methods(\"GET\").HandlerFunc(s.handleSingleGet)\n\tr.Path(\"/multivalue/{id:[^/]+}\").Methods(\"PUT\").HandlerFunc(s.handleMultiPut)\n\tr.Path(\"/multivalue/{id:[^/]+}\").Methods(\"GET\").HandlerFunc(s.handleMultiGet)\n\tr.Path(\"/hyperloglog/{id:[^/]+}\").Methods(\"POST\").HandlerFunc(s.handleHyperLogLogPost)\n\tr.Path(\"/hyperloglog/{id:[^/]+}\").Methods(\"GET\").HandlerFunc(s.handleHyperLogLogGet)\n\tr.Path(\"/bloom/{id:[^/]+}/{capacity:[0-9]+}/{fpr:[0-9\\\\.]+}\").Methods(\"POST\").HandlerFunc(s.handleBloomPost)\n\tr.Path(\"/bloom/{id:[^/]+}\").Methods(\"GET\").HandlerFunc(s.handleBloomGet)\n\ts.Handler = r\n\treturn s\n}\n\nfunc (s *PublicServer) handleLimit(w http.ResponseWriter, r *http.Request) {\n\tsetRoute(r.Context(), \"POST /limit\")\n\n\ttoken, err := parseToken(r)\n\tif err != nil {\n\t\terrors.Encode(w, err)\n\t\treturn\n\t}\n\n\tvar (\n\t\tvars = mux.Vars(r)\n\t\tid = vars[\"id\"]\n\t\tmode = parseConsistencyMode(r.URL.Query())\n\t)\n\tif id == \"\" {\n\t\terrors.Encode(w, ErrNoID)\n\t\treturn\n\t}\n\n\tcapacityStr := vars[\"capacity\"]\n\tif capacityStr == \"\" {\n\t\terrors.Encode(w, errors.New(\"capacity parameter is required (internal routing error)\"))\n\t\treturn\n\t}\n\n\tcapacity, err := strconv.ParseUint(capacityStr, 10, 64)\n\tif err != nil {\n\t\terrors.Encode(w, errors.WrapfCode(http.StatusBadRequest, err, \"invalid capacity (%s)\", capacityStr))\n\t\treturn\n\t}\n\n\twindowStr := vars[\"window\"]\n\tif windowStr == \"\" {\n\t\terrors.Encode(w, errors.Wrap(err, \"window parameter is required (internal routing error)\"))\n\t\treturn\n\t}\n\n\twindow, err := time.ParseDuration(windowStr)\n\tif err != nil {\n\t\terrors.Encode(w, errors.WrapfCode(http.StatusBadRequest, err, \"invalid window (%s)\", windowStr))\n\t\treturn\n\t}\n\tid = fmt.Sprintf(\"%s_%s\", id, time.Now().UTC().Truncate(window).Format(\"20060102150405\"))\n\n\tvar n uint64 = 1\n\tif nStr := r.URL.Query().Get(\"n\"); nStr != \"\" {\n\t\tvar err error\n\t\tn, err = strconv.ParseUint(nStr, 10, 64)\n\t\tif err != nil {\n\t\t\terrors.WrapfCode(http.StatusBadRequest, err, \"invalid n (%s)\", nStr)\n\t\t\treturn\n\t\t}\n\t}\n\n\t// DCounterDecrement will return object.ErrCapacityExceeded if it would go\n\t// below zero. We catch that here.\n\tobj, err := s.auth.ExecMode(r.Context(), token, id, replica.DCounterDecrement{Capacity: capacity, Delta: n}, mode)\n\tif errors.SomewhatEqual(err, object.ErrCapacityExceeded) {\n\t\tencodePublicError(w, object.ErrCapacityExceeded)\n\t\treturn\n\t}\n\tif err != nil {\n\t\terrors.Encode(w, errors.Wrapf(err, \"error executing rate limiting request\"))\n\t\treturn\n\t}\n\n\tvar counter object.DCounter\n\tif err := counter.Deserialize(obj); err != nil {\n\t\terrors.Encode(w, errors.Wrap(err, \"error deserializing response object\"))\n\t\treturn\n\t}\n\n\tremaining := counter.Read()\n\tw.Header().Set(LimitRemainingHeaderKey, fmt.Sprint(remaining))\n\trespondPublicSuccessf(w, \"OK, %d remaining\\n\", remaining)\n}\n\nfunc (s *PublicServer) handleMultiPut(w http.ResponseWriter, r *http.Request) {\n\tsetRoute(r.Context(), \"PUT /multivalue\")\n\n\ttoken, err := parseToken(r)\n\tif err != nil {\n\t\terrors.Encode(w, err)\n\t\treturn\n\t}\n\n\tvar (\n\t\tid = mux.Vars(r)[\"id\"]\n\t\tmode = parseConsistencyMode(r.URL.Query())\n\t)\n\tif id == \"\" {\n\t\terrors.Encode(w, ErrNoID)\n\t\treturn\n\t}\n\n\tvalue, err := ioutil.ReadAll(http.MaxBytesReader(w, r.Body, MaxObjectSizeBytes))\n\tif err != nil {\n\t\terrors.Encode(w, errors.WrapCode(http.StatusBadRequest, err, \"error reading request body\"))\n\t\treturn\n\t}\n\n\t_, force := r.URL.Query()[\"force\"]\n\n\tvar context object.DottedVersionVectorSet\n\tif !force {\n\t\tif contextStr := r.Header.Get(CausalContextHeaderKey); contextStr != \"\" {\n\t\t\tdec := base64.NewDecoder(base64.StdEncoding, strings.NewReader(contextStr))\n\t\t\tif err := json.NewDecoder(dec).Decode(&context); err != nil {\n\t\t\t\terrors.Encode(w, errors.WrapfCode(http.StatusBadRequest, err, \"error decoding %s\", CausalContextHeaderKey))\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t}\n\n\t_, err = s.auth.ExecMode(r.Context(), token, id, replica.MVRegisterWrite{Value: value, Context: context, Force: force}, mode)\n\tif err != nil {\n\t\terrors.Encode(w, errors.Wrap(err, \"error executing multi-register write\"))\n\t\treturn\n\t}\n\n\trespondPublicSuccessf(w, \"Put OK, %dB\\n\", len(value))\n}\n\nfunc (s *PublicServer) handleMultiGet(w http.ResponseWriter, r *http.Request) {\n\tsetRoute(r.Context(), \"GET /multivalue\")\n\n\ttoken, err := parseToken(r)\n\tif err != nil {\n\t\terrors.Encode(w, err)\n\t\treturn\n\t}\n\n\tvar (\n\t\tid = mux.Vars(r)[\"id\"]\n\t\tmode = parseConsistencyMode(r.URL.Query())\n\t)\n\tif id == \"\" {\n\t\terrors.Encode(w, ErrNoID)\n\t\treturn\n\t}\n\n\tobj, err := s.auth.ExecMode(r.Context(), token, id, replica.MVRegisterRead{}, mode)\n\tif errors.SomewhatEqual(err, object.ErrNotFound) {\n\t\tencodePublicError(w, object.ErrNotFound)\n\t\treturn\n\t}\n\tif err != nil {\n\t\terrors.Encode(w, errors.Wrap(err, \"error executing multi-register read\"))\n\t\treturn\n\t}\n\n\tvar register object.MVRegister\n\tif err := register.Deserialize(obj); err != nil {\n\t\terrors.Encode(w, errors.Wrap(err, \"error deserializing response object\"))\n\t\treturn\n\t}\n\n\tvalues, context := register.Get()\n\tif len(values) <= 0 {\n\t\terrors.Encode(w, errors.NewCode(http.StatusNotFound, \"multi-register object not found\"))\n\t\treturn\n\t}\n\n\tvar buf bytes.Buffer\n\tenc := base64.NewEncoder(base64.StdEncoding, &buf)\n\tif err := json.NewEncoder(enc).Encode(context); err != nil {\n\t\terrors.Encode(w, errors.Wrap(err, \"error serializing causal context\"))\n\t\treturn\n\t}\n\tif err := enc.Close(); err != nil {\n\t\terrors.Encode(w, errors.Wrap(err, \"error serializing causal context\"))\n\t\treturn\n\t}\n\tw.Header().Set(CausalContextHeaderKey, buf.String())\n\n\tif len(values) == 1 {\n\t\tw.Header().Set(\"Content-Type\", \"application/octet-stream; charset=utf-8\")\n\t\tw.Write(values[0])\n\t\treturn\n\t}\n\n\tmediatype, _, err := mime.ParseMediaType(r.Header.Get(\"Accept\"))\n\tif err != nil {\n\t\terrors.Encode(w, errors.WrapCode(http.StatusNotAcceptable, err, \"error parsing Accept headers\"))\n\t\treturn\n\t}\n\tif mediatype != \"multipart/form-data\" {\n\t\terrors.Encode(w, errors.NewCode(http.StatusMultipleChoices, \"multiple values; set Accept: multipart/form-data and prepare for a multipart response\"))\n\t\treturn\n\t}\n\n\tmw := multipart.NewWriter(w)\n\tw.Header().Set(\"Content-Type\", mw.FormDataContentType())\n\tfor _, value := range values {\n\t\tfw, err := mw.CreateFormField(\"value\")\n\t\tif err != nil {\n\t\t\terrors.Encode(w, errors.Wrap(err, \"error creating multipart response\"))\n\t\t\treturn\n\t\t}\n\t\tif _, err := fw.Write(value); err != nil {\n\t\t\terrors.Encode(w, errors.Wrap(err, \"error writing multipart response\"))\n\t\t\treturn\n\t\t}\n\t}\n\tif err := mw.Close(); err != nil {\n\t\terrors.Encode(w, errors.Wrap(err, \"error closing multipart response\"))\n\t\treturn\n\t}\n}\n\nfunc (s *PublicServer) handleSinglePut(w http.ResponseWriter, r *http.Request) {\n\tsetRoute(r.Context(), \"PUT /value\")\n\n\ttoken, err := parseToken(r)\n\tif err != nil {\n\t\terrors.Encode(w, err)\n\t\treturn\n\t}\n\n\tvar (\n\t\tid = mux.Vars(r)[\"id\"]\n\t\tmode = parseConsistencyMode(r.URL.Query())\n\t)\n\tif id == \"\" {\n\t\terrors.Encode(w, ErrNoID)\n\t\treturn\n\t}\n\n\tvalue, err := ioutil.ReadAll(http.MaxBytesReader(w, r.Body, MaxObjectSizeBytes))\n\tif err != nil {\n\t\terrors.Encode(w, errors.Wrap(err, \"error reading request body\"))\n\t\treturn\n\t}\n\n\tobj, err := s.auth.ExecMode(r.Context(), token, id, replica.LWWRegisterWrite{Value: value}, mode)\n\tif err != nil {\n\t\terrors.Encode(w, errors.Wrap(err, \"error executing register write\"))\n\t\treturn\n\t}\n\n\tvar register object.LWWRegister\n\tif err := register.Deserialize(obj); err != nil {\n\t\terrors.Encode(w, errors.Wrap(err, \"error deserializing response object\"))\n\t\treturn\n\t}\n\n\tw.Header().Set(LWWTimestampKey, register.Timestamp)\n\trespondPublicSuccessf(w, \"Put OK, %dB\\n\", len(register.Value))\n}\n\nfunc (s *PublicServer) handleSingleGet(w http.ResponseWriter, r *http.Request) {\n\tsetRoute(r.Context(), \"GET /value\")\n\n\ttoken, err := parseToken(r)\n\tif err != nil {\n\t\terrors.Encode(w, err)\n\t\treturn\n\t}\n\n\tvar (\n\t\tid = mux.Vars(r)[\"id\"]\n\t\tmode = parseConsistencyMode(r.URL.Query())\n\t)\n\tif id == \"\" {\n\t\terrors.Encode(w, ErrNoID)\n\t\treturn\n\t}\n\n\tobj, err := s.auth.ExecMode(r.Context(), token, id, replica.LWWRegisterRead{}, mode)\n\tif errors.SomewhatEqual(err, object.ErrNotFound) {\n\t\tencodePublicError(w, object.ErrNotFound)\n\t\treturn\n\t}\n\tif err != nil {\n\t\terrors.Encode(w, errors.Wrap(err, \"error executing register read\"))\n\t\treturn\n\t}\n\n\tvar register object.LWWRegister\n\tif err := register.Deserialize(obj); err != nil {\n\t\terrors.Encode(w, errors.Wrap(err, \"error deserializing response object\"))\n\t\treturn\n\t}\n\n\tw.Header().Set(LWWTimestampKey, register.Timestamp)\n\tw.Write(register.Value)\n}\n\nfunc (s *PublicServer) handleHyperLogLogPost(w http.ResponseWriter, r *http.Request) {\n\tsetRoute(r.Context(), \"POST /hyperloglog\")\n\n\ttoken, err := parseToken(r)\n\tif err != nil {\n\t\terrors.Encode(w, err)\n\t\treturn\n\t}\n\n\tvar (\n\t\tid = mux.Vars(r)[\"id\"]\n\t\tmode = parseConsistencyMode(r.URL.Query())\n\t)\n\tif id == \"\" {\n\t\terrors.Encode(w, ErrNoID)\n\t\treturn\n\t}\n\n\tpStr := r.URL.Query().Get(\"p\")\n\tif pStr == \"\" {\n\t\tpStr = \"16\"\n\t}\n\n\tp, err := strconv.ParseInt(pStr, 10, 8)\n\tif err != nil {\n\t\terrors.Encode(w, errors.WrapCode(http.StatusBadRequest, err, \"error parsing precision p-value\"))\n\t\treturn\n\t}\n\n\titem, err := ioutil.ReadAll(http.MaxBytesReader(w, r.Body, MaxItemSizeBytes))\n\tif err != nil {\n\t\terrors.Encode(w, errors.WrapCode(http.StatusBadRequest, err, \"error reading request body\"))\n\t\treturn\n\t}\n\n\t_, err = s.auth.ExecMode(r.Context(), token, id, replica.HyperLogLogAdd{P: uint8(p), Item: item}, mode)\n\tif err != nil {\n\t\terrors.Encode(w, errors.Wrap(err, \"error executing HyperLogLog add\"))\n\t\treturn\n\t}\n\n\trespondPublicSuccessf(w, \"Add OK, %dB\\n\", len(item))\n}\n\nfunc (s *PublicServer) handleHyperLogLogGet(w http.ResponseWriter, r *http.Request) {\n\tsetRoute(r.Context(), \"GET /hyperloglog\")\n\n\ttoken, err := parseToken(r)\n\tif err != nil {\n\t\terrors.Encode(w, err)\n\t\treturn\n\t}\n\n\tvar (\n\t\tid = mux.Vars(r)[\"id\"]\n\t\tmode = parseConsistencyMode(r.URL.Query())\n\t)\n\tif id == \"\" {\n\t\terrors.Encode(w, ErrNoID)\n\t\treturn\n\t}\n\n\tobj, err := s.auth.ExecMode(r.Context(), token, id, replica.HyperLogLogRead{}, mode)\n\tif err != nil {\n\t\terrors.Encode(w, errors.Wrap(err, \"error executing HyperLogLog read\"))\n\t\treturn\n\t}\n\n\tvar hll object.HyperLogLog\n\tif err := hll.Deserialize(obj); err != nil {\n\t\terrors.Encode(w, errors.Wrap(err, \"error deserializing response object\"))\n\t\treturn\n\t}\n\n\tfmt.Fprintf(w, \"%d\", hll.Count())\n}\n\nfunc (s *PublicServer) handleBloomPost(w http.ResponseWriter, r *http.Request) {\n\tsetRoute(r.Context(), \"POST /bloom\")\n\n\ttoken, err := parseToken(r)\n\tif err != nil {\n\t\terrors.Encode(w, err)\n\t\treturn\n\t}\n\n\tvar (\n\t\tvars = mux.Vars(r)\n\t\tid = vars[\"id\"]\n\t\tmode = parseConsistencyMode(r.URL.Query())\n\t)\n\tif id == \"\" {\n\t\terrors.Encode(w, ErrNoID)\n\t\treturn\n\t}\n\n\tcapacityStr := vars[\"capacity\"]\n\tif capacityStr == \"\" {\n\t\terrors.Encode(w, errors.New(\"capacity parameter is required (internal routing error)\"))\n\t\treturn\n\t}\n\n\tcapacity, err := strconv.ParseInt(capacityStr, 10, 64)\n\tif err != nil {\n\t\terrors.Encode(w, errors.WrapfCode(http.StatusBadRequest, err, \"invalid capacity (%s)\", capacityStr))\n\t\treturn\n\t}\n\tif capacity <= 0 {\n\t\terrors.Encode(w, errors.NewCode(http.StatusBadRequest, \"capacity must be greater than zero\"))\n\t\treturn\n\t}\n\n\tfprStr := vars[\"fpr\"]\n\tif fprStr == \"\" {\n\t\terrors.Encode(w, errors.New(\"false positive rate is required (internal routing error)\"))\n\t\treturn\n\t}\n\n\tfpr, err := strconv.ParseFloat(fprStr, 64)\n\tif err != nil {\n\t\terrors.Encode(w, errors.WrapfCode(http.StatusBadRequest, err, \"invalid false positive rate (%s)\", fprStr))\n\t\treturn\n\t}\n\tif fpr < 0.001 || fpr > 0.5 {\n\t\terrors.Encode(w, errors.NewCode(http.StatusBadRequest, \"false positive rate must be between 0.001 and 0.5\"))\n\t\treturn\n\t}\n\n\titem, err := ioutil.ReadAll(http.MaxBytesReader(w, r.Body, MaxItemSizeBytes))\n\tif err != nil {\n\t\terrors.Encode(w, errors.WrapCode(http.StatusBadRequest, err, \"error reading request body\"))\n\t\treturn\n\t}\n\n\t_, err = s.auth.ExecMode(r.Context(), token, id, replica.BloomFilterInsert{Capacity: int(capacity), FalsePositiveRate: fpr, Item: item}, mode)\n\tif err != nil {\n\t\terrors.Encode(w, errors.Wrap(err, \"error executing Bloom filter insert\"))\n\t\treturn\n\t}\n\n\trespondPublicSuccessf(w, \"Insert OK, %dB\\n\", len(item))\n}\n\nfunc (s *PublicServer) handleBloomGet(w http.ResponseWriter, r *http.Request) {\n\tsetRoute(r.Context(), \"GET /bloom\")\n\n\ttoken, err := parseToken(r)\n\tif err != nil {\n\t\terrors.Encode(w, err)\n\t\treturn\n\t}\n\n\tvar (\n\t\tid = mux.Vars(r)[\"id\"]\n\t\tmode = parseConsistencyMode(r.URL.Query())\n\t)\n\tif id == \"\" {\n\t\terrors.Encode(w, ErrNoID)\n\t\treturn\n\t}\n\n\titem, err := ioutil.ReadAll(http.MaxBytesReader(w, r.Body, MaxItemSizeBytes))\n\tif err != nil {\n\t\terrors.Encode(w, errors.WrapCode(http.StatusBadRequest, err, \"error reading request body\"))\n\t\treturn\n\t}\n\n\tobj, err := s.auth.ExecMode(r.Context(), token, id, replica.BloomFilterRead{}, mode)\n\tif err != nil {\n\t\terrors.Encode(w, errors.Wrap(err, \"error executing Bloom filter read\"))\n\t\treturn\n\t}\n\n\tvar f object.BloomFilter\n\tif err := f.Deserialize(obj); err != nil {\n\t\terrors.Encode(w, errors.Wrap(err, \"error deserializing response object\"))\n\t\treturn\n\t}\n\n\tfmt.Fprintf(w, \"%v\", f.Lookup(item))\n}\n\nfunc encodePublicError(w http.ResponseWriter, err errors.Error) {\n\tw.WriteHeader(err.StatusCode)\n\tfmt.Fprintln(w, err.Err)\n}\n"}} | |
[Info - 10:27:43 AM] 32.625645ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go "env" "GOMOD", stderr: <<>> | |
[Trace - 10:27:43 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"32.625645ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go \"env\" \"GOMOD\", stderr: \u003c\u003c\u003e\u003e\n"} | |
[Info - 10:27:43 AM] 62.420724ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go "list" "-m" "-json" "all", stderr: <<>> | |
[Trace - 10:27:43 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"62.420724ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go \"list\" \"-m\" \"-json\" \"all\", stderr: \u003c\u003c\u003e\u003e\n"} | |
[Info - 10:27:44 AM] 245.871777ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go "list" "-e" "-json" "-compiled=true" "-test=true" "-export=false" "-deps=true" "-find=false" "--" "/Users/pbourgon/mod/REDACTED/pkg/api", stderr: <<>> | |
[Trace - 10:27:44 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"245.871777ms for GOROOT=/usr/local/Cellar/go/1.12.7/libexec GOPATH=/Users/pbourgon GO111MODULE= PWD=/Users/pbourgon/mod/REDACTED go \"list\" \"-e\" \"-json\" \"-compiled=true\" \"-test=true\" \"-export=false\" \"-deps=true\" \"-find=false\" \"--\" \"/Users/pbourgon/mod/REDACTED/pkg/api\", stderr: \u003c\u003c\u003e\u003e\n"} | |
[Info - 10:27:44 AM] go/packages.Load | |
packages = 2 | |
[Trace - 10:27:44 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"go/packages.Load\n\tpackages = 2"} | |
[Trace - 10:27:44 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"go/packages.Load\n\tpackage = github.com/fastly/REDACTED/pkg/api\n\tfiles = [/Users/pbourgon/mod/REDACTED/pkg/api/debug.go /Users/pbourgon/mod/REDACTED/pkg/api/doc.go /Users/pbourgon/mod/REDACTED/pkg/api/internal.go /Users/pbourgon/mod/REDACTED/pkg/api/middlewares.go /Users/pbourgon/mod/REDACTED/pkg/api/public.go /Users/pbourgon/mod/REDACTED/pkg/api/tls.go /Users/pbourgon/mod/REDACTED/pkg/api/util.go /Users/pbourgon/mod/REDACTED/pkg/api/tls_test.go]"} | |
[Trace - 10:27:44 AM] Received notification 'window/logMessage' in 0ms. | |
Params: {"type":3,"message":"go/packages.Load\n\tpackage = github.com/fastly/REDACTED/pkg/api\n\tfiles = [/Users/pbourgon/mod/REDACTED/pkg/api/debug.go /Users/pbourgon/mod/REDACTED/pkg/api/doc.go /Users/pbourgon/mod/REDACTED/pkg/api/internal.go /Users/pbourgon/mod/REDACTED/pkg/api/middlewares.go /Users/pbourgon/mod/REDACTED/pkg/api/public.go /Users/pbourgon/mod/REDACTED/pkg/api/tls.go /Users/pbourgon/mod/REDACTED/pkg/api/util.go]"} | |
[Info - 10:27:44 AM] go/packages.Load | |
package = github.com/fastly/REDACTED/pkg/api | |
files = [/Users/pbourgon/mod/REDACTED/pkg/api/debug.go /Users/pbourgon/mod/REDACTED/pkg/api/doc.go /Users/pbourgon/mod/REDACTED/pkg/api/internal.go /Users/pbourgon/mod/REDACTED/pkg/api/middlewares.go /Users/pbourgon/mod/REDACTED/pkg/api/public.go /Users/pbourgon/mod/REDACTED/pkg/api/tls.go /Users/pbourgon/mod/REDACTED/pkg/api/util.go /Users/pbourgon/mod/REDACTED/pkg/api/tls_test.go] | |
[Info - 10:27:44 AM] go/packages.Load | |
package = github.com/fastly/REDACTED/pkg/api | |
files = [/Users/pbourgon/mod/REDACTED/pkg/api/debug.go /Users/pbourgon/mod/REDACTED/pkg/api/doc.go /Users/pbourgon/mod/REDACTED/pkg/api/internal.go /Users/pbourgon/mod/REDACTED/pkg/api/middlewares.go /Users/pbourgon/mod/REDACTED/pkg/api/public.go /Users/pbourgon/mod/REDACTED/pkg/api/tls.go /Users/pbourgon/mod/REDACTED/pkg/api/util.go] | |
[Trace - 10:27:44 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/tls.go","diagnostics":[]} | |
[Trace - 10:27:44 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/util.go","diagnostics":[]} | |
[Trace - 10:27:44 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/debug.go","diagnostics":[]} | |
[Trace - 10:27:44 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/doc.go","diagnostics":[]} | |
[Trace - 10:27:44 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/internal.go","diagnostics":[]} | |
[Trace - 10:27:44 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/middlewares.go","diagnostics":[]} | |
[Trace - 10:27:44 AM] Received notification 'textDocument/publishDiagnostics' in 0ms. | |
Params: {"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/public.go","diagnostics":[{"range":{"start":{"line":55,"character":13},"end":{"line":55,"character":13}},"severity":1,"source":"LSP","message":"cannot use (*auth.Node)(nil) (value of type *auth.Node) as Auth value in variable declaration: wrong type for method ExecMode"}]} | |
[Trace - 10:27:44 AM] Received response 'textDocument/documentLink - (30)' in 0ms. | |
Params: [{"range":{"start":{"line":3,"character":1},"end":{"line":3,"character":8}},"target":"https://godoc.org/bytes"},{"range":{"start":{"line":4,"character":1},"end":{"line":4,"character":10}},"target":"https://godoc.org/context"},{"range":{"start":{"line":5,"character":1},"end":{"line":5,"character":18}},"target":"https://godoc.org/encoding/base64"},{"range":{"start":{"line":6,"character":1},"end":{"line":6,"character":16}},"target":"https://godoc.org/encoding/json"},{"range":{"start":{"line":7,"character":1},"end":{"line":7,"character":6}},"target":"https://godoc.org/fmt"},{"range":{"start":{"line":8,"character":1},"end":{"line":8,"character":12}},"target":"https://godoc.org/io/ioutil"},{"range":{"start":{"line":9,"character":1},"end":{"line":9,"character":7}},"target":"https://godoc.org/mime"},{"range":{"start":{"line":10,"character":1},"end":{"line":10,"character":17}},"target":"https://godoc.org/mime/multipart"},{"range":{"start":{"line":11,"character":1},"end":{"line":11,"character":11}},"target":"https://godoc.org/net/http"},{"range":{"start":{"line":12,"character":1},"end":{"line":12,"character":10}},"target":"https://godoc.org/strconv"},{"range":{"start":{"line":13,"character":1},"end":{"line":13,"character":10}},"target":"https://godoc.org/strings"},{"range":{"start":{"line":14,"character":1},"end":{"line":14,"character":7}},"target":"https://godoc.org/time"},{"range":{"start":{"line":16,"character":1},"end":{"line":16,"character":36}},"target":"https://godoc.org/github.com/fastly/REDACTED/pkg/auth"},{"range":{"start":{"line":17,"character":1},"end":{"line":17,"character":38}},"target":"https://godoc.org/github.com/fastly/REDACTED/pkg/errors"},{"range":{"start":{"line":18,"character":1},"end":{"line":18,"character":38}},"target":"https://godoc.org/github.com/fastly/REDACTED/pkg/object"},{"range":{"start":{"line":19,"character":1},"end":{"line":19,"character":39}},"target":"https://godoc.org/github.com/fastly/REDACTED/pkg/replica"},{"range":{"start":{"line":20,"character":1},"end":{"line":20,"character":36}},"target":"https://godoc.org/github.com/fastly/REDACTED/pkg/ring"},{"range":{"start":{"line":21,"character":1},"end":{"line":21,"character":25}},"target":"https://godoc.org/github.com/gorilla/mux"}] | |
[Trace - 10:27:44 AM] Sending notification 'textDocument/documentLink' in 317ms. | |
Params: {"textDocument":{"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/public.go"}} | |
[Trace - 10:27:44 AM] Received response 'textDocument/codeAction - (31)' in 0ms. | |
Params: [{"title":"Organize Imports","kind":"source.organizeImports","edit":{"changes":{"file:///Users/pbourgon/mod/REDACTED/pkg/api/public.go":[]}}}] | |
[Trace - 10:27:44 AM] Sending notification 'textDocument/codeAction' in 324ms. | |
Params: {"textDocument":{"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/public.go"},"range":{"start":{"line":0,"character":0},"end":{"line":0,"character":0}},"context":{"diagnostics":[]}} | |
[Trace - 10:27:44 AM] Received response 'textDocument/documentSymbol - (32)' in 0ms. | |
Params: [{"name":"LimitRemainingHeaderKey","detail":"untyped string","kind":14,"range":{"start":{"line":24,"character":0},"end":{"line":46,"character":1}},"selectionRange":{"start":{"line":27,"character":1},"end":{"line":27,"character":24}}},{"name":"CausalContextHeaderKey","detail":"untyped string","kind":14,"range":{"start":{"line":24,"character":0},"end":{"line":46,"character":1}},"selectionRange":{"start":{"line":32,"character":1},"end":{"line":32,"character":23}}},{"name":"LWWTimestampKey","detail":"untyped string","kind":14,"range":{"start":{"line":24,"character":0},"end":{"line":46,"character":1}},"selectionRange":{"start":{"line":36,"character":1},"end":{"line":36,"character":16}}},{"name":"MaxObjectSizeBytes","detail":"untyped int","kind":14,"range":{"start":{"line":24,"character":0},"end":{"line":46,"character":1}},"selectionRange":{"start":{"line":40,"character":1},"end":{"line":40,"character":19}}},{"name":"MaxItemSizeBytes","detail":"untyped int","kind":14,"range":{"start":{"line":24,"character":0},"end":{"line":46,"character":1}},"selectionRange":{"start":{"line":45,"character":1},"end":{"line":45,"character":17}}},{"name":"Auth","detail":"interface{...}","kind":11,"range":{"start":{"line":50,"character":5},"end":{"line":52,"character":1}},"selectionRange":{"start":{"line":50,"character":5},"end":{"line":50,"character":9}},"children":[{"name":"ExecMode","kind":6,"range":{"start":{"line":51,"character":1},"end":{"line":51,"character":111}},"selectionRange":{"start":{"line":51,"character":1},"end":{"line":51,"character":9}}}]},{"name":"_","detail":"Auth","kind":13,"range":{"start":{"line":55,"character":0},"end":{"line":55,"character":30}},"selectionRange":{"start":{"line":55,"character":4},"end":{"line":55,"character":5}}},{"name":"PublicServer","detail":"struct{...}","kind":23,"range":{"start":{"line":64,"character":5},"end":{"line":67,"character":1}},"selectionRange":{"start":{"line":64,"character":5},"end":{"line":64,"character":17}},"children":[{"name":"auth","detail":"interface{...}","kind":8,"range":{"start":{"line":65,"character":1},"end":{"line":65,"character":10}},"selectionRange":{"start":{"line":65,"character":1},"end":{"line":65,"character":5}}},{"name":"Handler","detail":"interface{...}","kind":8,"range":{"start":{"line":66,"character":1},"end":{"line":66,"character":13}},"selectionRange":{"start":{"line":66,"character":1},"end":{"line":66,"character":13}}},{"name":"handleHyperLogLogPost","detail":"(w http.ResponseWriter, r *http.Request)","kind":6,"range":{"start":{"line":375,"character":0},"end":{"line":417,"character":1}},"selectionRange":{"start":{"line":375,"character":23},"end":{"line":375,"character":44}}},{"name":"handleBloomPost","detail":"(w http.ResponseWriter, r *http.Request)","kind":6,"range":{"start":{"line":452,"character":0},"end":{"line":516,"character":1}},"selectionRange":{"start":{"line":452,"character":23},"end":{"line":452,"character":38}}},{"name":"handleMultiPut","detail":"(w http.ResponseWriter, r *http.Request)","kind":6,"range":{"start":{"line":164,"character":0},"end":{"line":208,"character":1}},"selectionRange":{"start":{"line":164,"character":23},"end":{"line":164,"character":37}}},{"name":"handleSingleGet","detail":"(w http.ResponseWriter, r *http.Request)","kind":6,"range":{"start":{"line":337,"character":0},"end":{"line":373,"character":1}},"selectionRange":{"start":{"line":337,"character":23},"end":{"line":337,"character":38}}},{"name":"handleSinglePut","detail":"(w http.ResponseWriter, r *http.Request)","kind":6,"range":{"start":{"line":297,"character":0},"end":{"line":335,"character":1}},"selectionRange":{"start":{"line":297,"character":23},"end":{"line":297,"character":38}}},{"name":"handleHyperLogLogGet","detail":"(w http.ResponseWriter, r *http.Request)","kind":6,"range":{"start":{"line":419,"character":0},"end":{"line":450,"character":1}},"selectionRange":{"start":{"line":419,"character":23},"end":{"line":419,"character":43}}},{"name":"handleBloomGet","detail":"(w http.ResponseWriter, r *http.Request)","kind":6,"range":{"start":{"line":518,"character":0},"end":{"line":555,"character":1}},"selectionRange":{"start":{"line":518,"character":23},"end":{"line":518,"character":37}}},{"name":"handleLimit","detail":"(w http.ResponseWriter, r *http.Request)","kind":6,"range":{"start":{"line":87,"character":0},"end":{"line":162,"character":1}},"selectionRange":{"start":{"line":87,"character":23},"end":{"line":87,"character":34}}},{"name":"handleMultiGet","detail":"(w http.ResponseWriter, r *http.Request)","kind":6,"range":{"start":{"line":210,"character":0},"end":{"line":295,"character":1}},"selectionRange":{"start":{"line":210,"character":23},"end":{"line":210,"character":37}}}]},{"name":"NewPublicServer","detail":"(a Auth)","kind":12,"range":{"start":{"line":70,"character":0},"end":{"line":85,"character":1}},"selectionRange":{"start":{"line":70,"character":5},"end":{"line":70,"character":20}}},{"name":"encodePublicError","detail":"(w http.ResponseWriter, err errors.Error)","kind":12,"range":{"start":{"line":557,"character":0},"end":{"line":560,"character":1}},"selectionRange":{"start":{"line":557,"character":5},"end":{"line":557,"character":22}}}] | |
[Trace - 10:27:44 AM] Sending notification 'textDocument/documentSymbol' in 324ms. | |
Params: {"textDocument":{"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/public.go"}} | |
[Trace - 10:27:44 AM] Received response 'textDocument/codeAction - (33)' in 0ms. | |
Params: [{"title":"Organize Imports","kind":"source.organizeImports","edit":{"changes":{"file:///Users/pbourgon/mod/REDACTED/pkg/api/public.go":[]}}}] | |
[Trace - 10:27:44 AM] Sending notification 'textDocument/codeAction' in 151ms. | |
Params: {"textDocument":{"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/public.go"},"range":{"start":{"line":315,"character":51},"end":{"line":315,"character":51}},"context":{"diagnostics":[]}} | |
[Trace - 10:27:44 AM] Sending notification '$/cancelRequest' in 151ms. | |
Params: {"id":31} | |
[Trace - 10:27:44 AM] Received response 'textDocument/codeAction - (34)' in 0ms. | |
Params: [{"title":"Organize Imports","kind":"source.organizeImports","edit":{"changes":{"file:///Users/pbourgon/mod/REDACTED/pkg/api/public.go":[]}}}] | |
[Trace - 10:27:44 AM] Sending notification 'textDocument/codeAction' in 10ms. | |
Params: {"textDocument":{"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/public.go"},"range":{"start":{"line":315,"character":51},"end":{"line":315,"character":51}},"context":{"diagnostics":[]}} | |
[Trace - 10:27:48 AM] Received response 'textDocument/hover - (35)' in 0ms. | |
Params: {"contents":{"kind":"markdown","value":"```go\npackage auth (\"github.com/fastly/REDACTED/pkg/auth\")\n```"},"range":{"start":{"line":55,"character":15},"end":{"line":55,"character":19}}} | |
[Trace - 10:27:48 AM] Sending notification 'textDocument/hover' in 0ms. | |
Params: {"textDocument":{"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/public.go"},"position":{"line":55,"character":15}} | |
[Trace - 10:27:49 AM] Received response 'textDocument/hover - (36)' in 0ms. | |
Params: {} | |
[Trace - 10:27:49 AM] Sending notification 'textDocument/hover' in 0ms. | |
Params: {"textDocument":{"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/public.go"},"position":{"line":55,"character":13}} | |
[Trace - 10:27:49 AM] Received response 'textDocument/codeAction - (37)' in 0ms. | |
Params: [{"title":"Organize Imports","kind":"source.organizeImports","edit":{"changes":{"file:///Users/pbourgon/mod/REDACTED/pkg/api/public.go":[]}}}] | |
[Trace - 10:27:49 AM] Sending notification 'textDocument/codeAction' in 8ms. | |
Params: {"textDocument":{"uri":"file:///Users/pbourgon/mod/REDACTED/pkg/api/public.go"},"range":{"start":{"line":55,"character":13},"end":{"line":55,"character":13}},"context":{"diagnostics":[{"range":{"start":{"line":55,"character":13},"end":{"line":55,"character":13}},"message":"cannot use (*auth.Node)(nil) (value of type *auth.Node) as Auth value in variable declaration: wrong type for method ExecMode","severity":1,"source":"LSP"}]}} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment