protocol

package
v0.2.21 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorReply

type ErrorReply struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

type Event

type Event struct {
	Type   string `json:"type,omitempty"`
	Event  string `json:"event"`
	CallID string `json:"call_id"`
	Seq    int    `json:"seq"`
	Data   any    `json:"data,omitempty"`
}

type Request

type Request struct {
	JSONRPC string         `json:"jsonrpc,omitempty"`
	ID      any            `json:"id,omitempty"`
	Method  string         `json:"method"`
	Params  map[string]any `json:"params,omitempty"`
}

type Response

type Response struct {
	JSONRPC string      `json:"jsonrpc,omitempty"`
	ID      any         `json:"id,omitempty"`
	Result  any         `json:"result,omitempty"`
	Error   *ErrorReply `json:"error,omitempty"`
}

func (Response) MarshalJSON

func (r Response) MarshalJSON() ([]byte, error)

type Server

type Server struct {
	Services  *core.Services
	Store     *config.Store
	Registry  *adapter.Registry
	PageStore *result.PageStore
	Protocol  string
}

func (*Server) Serve

func (s *Server) Serve(ctx context.Context, in io.Reader, out io.Writer) error

Jump to

Keyboard shortcuts

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