Versions in this module Expand all Collapse all v0 v0.1.3 Jul 3, 2026 v0.1.2 Jul 2, 2026 v0.1.1 Jul 1, 2026 v0.1.0 Jun 30, 2026 Changes in this version + const CodeInternalError + const CodeInvalidParams + const CodeInvalidRequest + const CodeMethodNotFound + const CodeParseError + func Mount(target route.Target, server *Server, options ...MountOption) + func Provider(server *Server, options ...Option) runaprovider.Provider + type Config struct + Path string + WSOptions []WSOption + WSPath string + type Context struct + func (ctx *Context) Context() context.Context + func (ctx *Context) Method() string + func (ctx *Context) Request() Request + func (ctx *Context) Scope() *scope.Scope + func (ctx *Context) Server() *Server + func (ctx *Context) SetContext(value context.Context) + func (ctx *Context) Transport() string + type Error struct + Code int + Data any + Message string + func (err *Error) Error() string + type Handler func(*Context) (any, error) + type ID = json.RawMessage + type Middleware func(Handler) Handler + type MountConfig struct + WSOptions []WSOption + WSPath string + type MountOption func(*MountConfig) + func WebSocket(path string, options ...WSOption) MountOption + type Option func(*Config) + func Path(value string) Option + func WSPath(value string, options ...WSOption) Option + type Registry struct + func (registry *Registry) Add(servers ...*Server) + func (registry *Registry) Servers() []*Server + type Request struct + ID ID + Method string + Params json.RawMessage + Version string + type Response struct + Error *Error + ID ID + Result any + Version string + func (response Response) MarshalJSON() ([]byte, error) + type Server struct + func Method[Input any, Output any](server *Server, name string, handler TypedHandler[Input, Output]) *Server + func New() *Server + func (server *Server) Call(ctx context.Context, method string, params any) (any, error) + func (server *Server) HTTP() route.Handler + func (server *Server) Register(name string, handler Handler) *Server + func (server *Server) Use(middlewares ...Middleware) *Server + func (server *Server) WS(options ...WSOption) route.Handler + type TypedHandler func(*Context, *Input) (*Output, error) + type WSConfig struct + MaxMessageSize int64 + Origin []string + ReadTimeout time.Duration + WriteTimeout time.Duration + type WSOption func(*WSConfig) + func MaxMessageSize(value int64) WSOption + func Origin(patterns ...string) WSOption + func ReadTimeout(value time.Duration) WSOption + func WriteTimeout(value time.Duration) WSOption