tools: golang.org/x/tools/internal/lsp/debug Index | Files

package debug

import "golang.org/x/tools/internal/lsp/debug"

Index

Package Files

info.1.12.go info.go metrics.go rpc.go serve.go trace.go

Constants

const (
    PlainText = PrintMode(iota)
    Markdown
    HTML
)

Variables

var BaseTemplate = template.Must(template.New("").Parse("" /* 779 byte string literal not displayed */,
)).Funcs(template.FuncMap{
    "fuint64": fuint64,
    "fuint32": fuint32,
})
var Version = "v0.1.5"

Version is a manually-updated mechanism for tracking versions.

func AddCache Uses

func AddCache(cache Cache)

AddCache adds a cache to the set being served

func AddSession Uses

func AddSession(session Session)

AddSession adds a session to the set being served

func AddView Uses

func AddView(view View)

AddView adds a view to the set being served

func DropCache Uses

func DropCache(cache Cache)

DropCache drops a cache from the set being served

func DropSession Uses

func DropSession(session Session)

DropSession drops a session from the set being served

func DropView Uses

func DropView(view View)

DropView drops a view from the set being served

func PrintVersionInfo Uses

func PrintVersionInfo(w io.Writer, verbose bool, mode PrintMode)

This writes the version and environment information to a writer.

func Render Uses

func Render(tmpl *template.Template, fun func(*http.Request) interface{}) func(http.ResponseWriter, *http.Request)

func Serve Uses

func Serve(ctx context.Context, addr string) error

Serve starts and runs a debug server in the background. It also logs the port the server starts on, to allow for :0 auto assigned ports.

type Cache Uses

type Cache interface {
    ID() string
    FileSet() *token.FileSet
}

type File Uses

type File struct {
    Session Session
    URI     span.URI
    Data    string
    Error   error
    Hash    string
}

type PrintMode Uses

type PrintMode int

type Session Uses

type Session interface {
    ID() string
    Cache() Cache
    Files() []*File
    File(hash string) *File
}

type View Uses

type View interface {
    ID() string
    Name() string
    Folder() span.URI
    Session() Session
}

Package debug imports 27 packages (graph) and is imported by 10 packages. Updated 2019-09-15. Refresh now. Tools for package owners.