Help us shape the future of Go! Take the 2026 Go Developer Survey

session

package
v1.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 5, 2024 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const SessionNotInitialized code.Code = -32002

Variables

This section is empty.

Functions

func NewSession

func NewSession(exitFunc context.CancelFunc) *session

func SessionAlreadyDownErr

func SessionAlreadyDownErr(reqID string) error

func SessionAlreadyInitializedErr

func SessionAlreadyInitializedErr(reqID string) error

func SessionNotInitializedErr

func SessionNotInitializedErr(state sessionState) error

Types

type ClientCaller

type ClientCaller interface {
	Callback(ctx context.Context, method string, params interface{}) (*jrpc2.Response, error)
}

type ClientNotifier

type ClientNotifier interface {
	Notify(ctx context.Context, method string, params interface{}) error
}

type InvalidURIErr

type InvalidURIErr struct {
	URI string
}

func (*InvalidURIErr) Error

func (e *InvalidURIErr) Error() string

type Server

type Server interface {
	ClientNotifier
	ClientCaller
}

type Session

type Session interface {
	Assigner() (jrpc2.Assigner, error)
	Finish(jrpc2.Assigner, jrpc2.ServerStatus)
	SetLogger(*log.Logger)
}

type SessionFactory

type SessionFactory func(context.Context) Session

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL