Documentation
¶
Index ¶
- type Factory
- type ServiceSession
- type Session
- func (s *Session) EnsureInitialized() error
- func (s *Session) Exit() error
- func (s *Session) FinishInitialization(req *jrpc2.Request) error
- func (s *Session) GetState() State
- func (s *Session) Init(req *jrpc2.Request) error
- func (s *Session) Prepare() error
- func (s *Session) Shutdown(req *jrpc2.Request) error
- type State
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Factory ¶
type Factory func(context.Context) ServiceSession
Factory is a callback function used for creating a ServiceSession with the provided context
type ServiceSession ¶
type ServiceSession interface { Assigner() (jrpc2.Assigner, error) Finish(jrpc2.Assigner, jrpc2.ServerStatus) SetLogger(*log.Logger) }
ServiceSession is an interface used to instantiate a JSON-RPC service
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session is a struct that represents an individual language server workspace
func New ¶
func New(cancelFunc context.CancelFunc) *Session
New instantiates a new language server workspace session
func (*Session) EnsureInitialized ¶
EnsureInitialized will return an error if the current session is not initialized
func (*Session) FinishInitialization ¶
FinishInitialization will attempt to set the state of the session to "initialized"
type State ¶
type State int
State represents the state of the language server session (workspace)
const ( // StateEmpty is the state of an empty session (before it starts) StateEmpty State = -1 // StatePrepared is the state of a session that's ready to accept requests StatePrepared State = 0 // StateInitializing is the state of a session after "initialize" StateInitializing State = 1 // StateInitialized is the state of a session after "initialized" StateInitialized State = 2 // StateShutdown is the state of a session after it has been shut down StateShutdown State = 3 )
Click to show internal directories.
Click to hide internal directories.