Versions in this module Expand all Collapse all v4 v4.0.4 Feb 13, 2023 v4.0.3 Oct 11, 2021 Changes in this version + const ReaderBuffsize + const WriterBuffsize + const XErrorMessage + const XHeartbeat + const XMessageID + const XMessageStatusType + const XMessageType + const XMeta + const XOneway + const XSerializeType + const XServiceMethod + const XServicePath + const XVersion + var ErrServerClosed = errors.New("http: Server closed") + var RemoteConnContextKey = &contextKey + var StartRequestContextKey = &contextKey + var StartSendRequestContextKey = &contextKey + var UsePool bool + func HTTPRequest2RpcxRequest(r *http.Request) (*protocol.Message, error) + func RegisterMakeListener(network string, ml MakeListener) + type MakeListener func(s *Server, address string) (ln net.Listener, err error) + type OptionFn func(*Server) + func WithReadTimeout(readTimeout time.Duration) OptionFn + func WithTLSConfig(cfg *tls.Config) OptionFn + func WithWriteTimeout(writeTimeout time.Duration) OptionFn + type Plugin interface + type PluginContainer interface + Add func(plugin Plugin) + All func() []Plugin + DoPostConnAccept func(net.Conn) (net.Conn, bool) + DoPostReadRequest func(ctx context.Context, r *protocol.Message, e error) error + DoPostWriteRequest func(ctx context.Context, r *protocol.Message, e error) error + DoPostWriteResponse func(context.Context, *protocol.Message, *protocol.Message, error) error + DoPreReadRequest func(ctx context.Context) error + DoPreWriteRequest func(ctx context.Context) error + DoPreWriteResponse func(context.Context, *protocol.Message) error + DoRegister func(name string, rcvr interface{}, metadata string) error + DoRegisterFunction func(name string, fn interface{}, metadata string) error + Remove func(plugin Plugin) + type PostConnAcceptPlugin interface + HandleConnAccept func(net.Conn) (net.Conn, bool) + type PostReadRequestPlugin interface + PostReadRequest func(ctx context.Context, r *protocol.Message, e error) error + type PostWriteRequestPlugin interface + PostWriteRequest func(ctx context.Context, r *protocol.Message, e error) error + type PostWriteResponsePlugin interface + PostWriteResponse func(context.Context, *protocol.Message, *protocol.Message, error) error + type PreReadRequestPlugin interface + PreReadRequest func(ctx context.Context) error + type PreWriteRequestPlugin interface + PreWriteRequest func(ctx context.Context) error + type PreWriteResponsePlugin interface + PreWriteResponse func(context.Context, *protocol.Message) error + type RegisterFunctionPlugin interface + RegisterFunction func(name string, fn interface{}, metadata string) error + type RegisterPlugin interface + Register func(name string, rcvr interface{}, metadata string) error + type Reset interface + Reset func() + type Server struct + AuthFunc func(ctx context.Context, req *protocol.Message, token string) error + Plugins PluginContainer + func NewServer(options ...OptionFn) *Server + func (s *Server) Address() net.Addr + func (s *Server) Close() error + func (s *Server) Register(rcvr interface{}, metadata string) error + func (s *Server) RegisterFunction(servicePath string, fn interface{}, metadata string) error + func (s *Server) RegisterFunctionName(servicePath string, name string, fn interface{}, metadata string) error + func (s *Server) RegisterName(name string, rcvr interface{}, metadata string) error + func (s *Server) RegisterOnShutdown(f func()) + func (s *Server) SendMessage(conn net.Conn, servicePath, serviceMethod string, metadata map[string]string, ...) error + func (s *Server) Serve(network, address string) (err error) + func (s *Server) ServeHTTP(w http.ResponseWriter, req *http.Request) Other modules containing this package github.com/werunclub/rpcx