server

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mux

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

func NewMux

func NewMux(r io.Reader, w io.Writer) *Mux

func (*Mux) AddNotificationHandler

func (m *Mux) AddNotificationHandler(method string, handler NotificationHandler)

func (*Mux) AddRequestHandler

func (m *Mux) AddRequestHandler(method string, handler RequestHandler)

func (*Mux) Init

func (m *Mux) Init() (err error)

func (*Mux) Notify

func (m *Mux) Notify(method string, params any) (err error)

func (*Mux) Run

func (m *Mux) Run() (err error)

type NotificationHandler

type NotificationHandler func(params json.RawMessage) (err error)

type RequestHandler

type RequestHandler func(params json.RawMessage) (result any, err error)

type Server

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

func NewServer

func NewServer(r io.Reader, w io.Writer) *Server

func (*Server) Run

func (s *Server) Run() (err error)

Jump to

Keyboard shortcuts

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