Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterNewCallerFunc(name string, fn NewCallerFunc)
- func RegisterNewHandlerFunc(name string, fn NewHandlerFunc)
- func WithCaller(c Caller) option.ApplyOption
- func WithHandler(h Handler) option.ApplyOption
- func WrapHandleFuncGenerics[IT, OT any](fn func(context.Context, IT) (OT, error)) rpc_interface.HandleFunc
- type Caller
- type EMPTY
- type Handler
- type Middleware
- type NewCallerFunc
- type NewCallerOption
- type NewHandlerFunc
- type NewHandlerOption
- type NewServerOption
- type Server
Constants ¶
View Source
const ( OPTION_HANDLER = "handler" OPTION_CALLER = "caller" )
Variables ¶
View Source
var (
ErrUnsupportedCaller, ErrUnsupportedCallerFn = errors.NewErrorAndErrorFunc[string]("unsupported caller")
ErrUnsupportedServer, ErrUnsupportedServerFn = errors.NewErrorAndErrorFunc[string]("unsupported server")
ErrUnsupportedHandler, ErrUnsupportedHandlerFn = errors.NewErrorAndErrorFunc[string]("unsupported handler")
ErrUnsupportedMethod, ErrUnsupportedMethodFn = errors.NewErrorAndErrorFunc[string]("unsupported method")
)
View Source
var RegisterNewServerFunc, NewServer = lib_registerer.Pair[Server]()
Functions ¶
func RegisterNewCallerFunc ¶
func RegisterNewCallerFunc(name string, fn NewCallerFunc)
func RegisterNewHandlerFunc ¶
func RegisterNewHandlerFunc(name string, fn NewHandlerFunc)
func WithCaller ¶
func WithCaller(c Caller) option.ApplyOption
func WithHandler ¶
func WithHandler(h Handler) option.ApplyOption
func WrapHandleFuncGenerics ¶
func WrapHandleFuncGenerics[IT, OT any](fn func(context.Context, IT) (OT, error)) rpc_interface.HandleFunc
Types ¶
type Caller ¶
type Caller = rpc_interface.Caller
type Handler ¶
type Handler = rpc_interface.Handler
func NewHandler ¶
func NewHandler(name string, opts ...NewHandlerOption) (Handler, error)
type Middleware ¶
type NewCallerFunc ¶
type NewCallerFunc func(...NewCallerOption) (Caller, error)
type NewCallerOption ¶
type NewCallerOption = rpc_interface.NewCallerOption
type NewHandlerFunc ¶
type NewHandlerFunc func(...NewHandlerOption) (Handler, error)
type NewHandlerOption ¶
type NewHandlerOption = rpc_interface.NewHandlerOption
type NewServerOption ¶
type NewServerOption = rpc_interface.NewServerOption
type Server ¶
type Server = rpc_interface.Server
Click to show internal directories.
Click to hide internal directories.