Documentation ¶
Overview ¶
Package cache implements the caching layer for gopls.
Index ¶
- Constants
- Variables
- type Cache
- func (c *Cache) FileSet() *token.FileSet
- func (c *Cache) GetFile(ctx context.Context, uri span.URI) (source.FileHandle, error)
- func (c *Cache) ID() string
- func (c *Cache) MemStats() map[reflect.Type]int
- func (c *Cache) NewSession(ctx context.Context) *Session
- func (c *Cache) PackageStats() template.HTML
- func (c *Cache) ParseGoHandle(ctx context.Context, fh source.FileHandle, mode source.ParseMode) source.ParseGoHandle
- type Session
- func (s *Session) Cache() source.Cache
- func (s *Session) DidModifyFiles(ctx context.Context, changes []source.FileModification) ([]source.Snapshot, error)
- func (s *Session) GetFile(ctx context.Context, uri span.URI) (source.FileHandle, error)
- func (s *Session) ID() string
- func (s *Session) NewView(ctx context.Context, name string, folder span.URI, options source.Options) (source.View, source.Snapshot, error)
- func (s *Session) Options() source.Options
- func (s *Session) Overlays() []source.Overlay
- func (s *Session) SetOptions(options source.Options)
- func (s *Session) Shutdown(ctx context.Context)
- func (s *Session) String() string
- func (s *Session) View(name string) source.View
- func (s *Session) ViewOf(uri span.URI) (source.View, error)
- func (s *Session) Views() []source.View
- type SessionKey
- type View
- func (v *View) BackgroundContext() context.Context
- func (v *View) BuiltinPackage(ctx context.Context) (source.BuiltinPackage, error)
- func (v *View) Folder() span.URI
- func (v *View) ID() string
- func (v *View) IsGoPrivatePath(target string) bool
- func (v *View) ModFiles() (span.URI, span.URI)
- func (v *View) Name() string
- func (v *View) Options() source.Options
- func (v *View) Rebuild(ctx context.Context) (source.Snapshot, error)
- func (v *View) RunProcessEnvFunc(ctx context.Context, fn func(*imports.Options) error) error
- func (v *View) Session() source.Session
- func (v *View) SetOptions(ctx context.Context, options source.Options) (source.View, error)
- func (v *View) Shutdown(ctx context.Context)
- func (v *View) Snapshot() source.Snapshot
- func (v *View) ValidBuildConfiguration() bool
- func (v *View) WriteEnv(ctx context.Context, w io.Writer) error
Constants ¶
View Source
const ( ModTidyError = "go mod tidy" SyntaxError = "syntax" )
Variables ¶
View Source
var ( KeyCreateSession = NewSessionKey("create_session", "A new session was added") KeyUpdateSession = NewSessionKey("update_session", "Updated information about a session") KeyShutdownSession = NewSessionKey("shutdown_session", "A session was shut down") )
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
func (*Cache) PackageStats ¶
func (*Cache) ParseGoHandle ¶
func (c *Cache) ParseGoHandle(ctx context.Context, fh source.FileHandle, mode source.ParseMode) source.ParseGoHandle
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func (*Session) DidModifyFiles ¶
func (*Session) SetOptions ¶
type SessionKey ¶
type SessionKey struct {
// contains filtered or unexported fields
}
SessionKey represents an event label key that has a *Session value.
func NewSessionKey ¶
func NewSessionKey(name, description string) *SessionKey
NewSessionKey creates a new Key for *Session values.
func (*SessionKey) Description ¶
func (k *SessionKey) Description() string
func (*SessionKey) From ¶
func (k *SessionKey) From(t label.Label) *Session
From can be used to get the session value from a Label.
func (*SessionKey) Get ¶
func (k *SessionKey) Get(lm label.Map) *Session
Get can be used to get the session for the key from a label.Map.
func (*SessionKey) Name ¶
func (k *SessionKey) Name() string
type View ¶
type View struct {
// contains filtered or unexported fields
}
func (*View) BackgroundContext ¶
func (*View) BuiltinPackage ¶
func (*View) IsGoPrivatePath ¶
func (*View) RunProcessEnvFunc ¶
func (*View) SetOptions ¶
func (*View) ValidBuildConfiguration ¶
Click to show internal directories.
Click to hide internal directories.