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

package cache

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

Package cache implements the caching layer for gopls.

Index

Package Files

analysis.go cache.go check.go debug.go errors.go external.go load.go mod.go parse.go pkg.go session.go snapshot.go view.go

Constants

const (
    ModTidyError = "go mod tidy"
    SyntaxError  = "syntax"
)

type Cache Uses

type Cache struct {
    // contains filtered or unexported fields
}

func New Uses

func New(ctx context.Context, options func(*source.Options)) *Cache

func (*Cache) FileSet Uses

func (c *Cache) FileSet() *token.FileSet

func (*Cache) GetFile Uses

func (c *Cache) GetFile(uri span.URI) source.FileHandle

func (*Cache) ID Uses

func (c *Cache) ID() string

func (*Cache) NewSession Uses

func (c *Cache) NewSession(ctx context.Context) *Session

func (*Cache) ParseGoHandle Uses

func (c *Cache) ParseGoHandle(fh source.FileHandle, mode source.ParseMode) source.ParseGoHandle

type DebugSession Uses

type DebugSession struct{ *Session }

func (DebugSession) Cache Uses

func (s DebugSession) Cache() debug.Cache

func (DebugSession) File Uses

func (s DebugSession) File(hash string) *debug.File

func (DebugSession) Files Uses

func (s DebugSession) Files() []*debug.File

func (DebugSession) ID Uses

func (s DebugSession) ID() string

type Session Uses

type Session struct {
    // contains filtered or unexported fields
}

func (*Session) Cache Uses

func (s *Session) Cache() source.Cache

func (*Session) DidModifyFiles Uses

func (s *Session) DidModifyFiles(ctx context.Context, changes []source.FileModification) ([]source.Snapshot, error)

func (*Session) GetFile Uses

func (s *Session) GetFile(uri span.URI) source.FileHandle

func (*Session) NewView Uses

func (s *Session) NewView(ctx context.Context, name string, folder span.URI, options source.Options) (source.View, source.Snapshot, error)

func (*Session) Options Uses

func (s *Session) Options() source.Options

func (*Session) SetOptions Uses

func (s *Session) SetOptions(options source.Options)

func (*Session) Shutdown Uses

func (s *Session) Shutdown(ctx context.Context)

func (*Session) View Uses

func (s *Session) View(name string) source.View

View returns the view by name.

func (*Session) ViewOf Uses

func (s *Session) ViewOf(uri span.URI) (source.View, error)

ViewOf returns a view corresponding to the given URI. If the file is not already associated with a view, pick one using some heuristics.

func (*Session) Views Uses

func (s *Session) Views() []source.View

Package cache imports 40 packages (graph) and is imported by 7 packages. Updated 2020-03-29. Refresh now. Tools for package owners.