Versions in this module Expand all Collapse all v0 v0.1.0 May 30, 2024 Changes in this version + const DEFAULT_MAX_REQUEST_SIZE + const FirstUserCode + const ProxyTagNotify + const ProxyTagRPCMethod + const ProxyTagRetry + func DecodeParams[T any](p RawParams) (T, error) + func ExtractReverseClient[C any](ctx context.Context) (C, bool) + func WithClientHandler(ns string, hnd interface{}) func(c *Config) + func WithClientHandlerAlias(alias, original string) func(c *Config) + func WithErrors(es Errors) func(c *Config) + func WithHTTPClient(h *http.Client) func(c *Config) + func WithNoReconnect() func(c *Config) + func WithParamEncoder(t interface{}, encoder ParamEncoder) func(c *Config) + func WithPingInterval(d time.Duration) func(c *Config) + func WithReconnectBackoff(minDelay, maxDelay time.Duration) func(c *Config) + func WithTimeout(d time.Duration) func(c *Config) + type ClientCloser func() + func NewClient(ctx context.Context, addr string, namespace string, handler interface{}, ...) (ClientCloser, error) + func NewMergeClient(ctx context.Context, addr string, namespace string, outs []interface{}, ...) (ClientCloser, error) + type Config struct + type ErrClient struct + func (e *ErrClient) Error() string + func (e *ErrClient) Unwrap() error + type ErrorCode int + type Errors struct + func NewErrors() Errors + func (e *Errors) Register(c ErrorCode, typ interface{}) + type MethodCaseTransformer func(string) string + type Option func(c *Config) + type ParamDecoder func(ctx context.Context, json []byte) (reflect.Value, error) + type ParamEncoder func(reflect.Value) (reflect.Value, error) + type RPCConnectionError struct + func (e *RPCConnectionError) Error() string + func (e *RPCConnectionError) Unwrap() error + type RPCServer struct + func NewServer(opts ...ServerOption) *RPCServer + func (s *RPCServer) AliasMethod(alias, original string) + func (s *RPCServer) Register(namespace string, handler interface{}) + func (s *RPCServer) ServeHTTP(w http.ResponseWriter, r *http.Request) + type RawParams json.RawMessage + type ServerConfig struct + type ServerOption func(c *ServerConfig) + func WithMaxRequestSize(max int64) ServerOption + func WithMethodTransformer(methodCaseTransformer MethodCaseTransformer) ServerOption + func WithNamespaceSeparator(seprator string) ServerOption + func WithParamDecoder(t interface{}, decoder ParamDecoder) ServerOption + func WithReverseClient[RP any](namespace string) ServerOption + func WithServerErrors(es Errors) ServerOption + func WithServerPingInterval(d time.Duration) ServerOption