Documentation
¶
Overview ¶
Package sessionrpc contains Redeven's application RPC registrations.
It deliberately owns no transport, framing, connection, or session lifecycle. Flowersec v2 supplies those concerns through SessionHandlers and RPCPeer; this package only keeps product type IDs and JSON handlers together.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToWireError ¶
Types ¶
type Handler ¶
type Handler func(context.Context, json.RawMessage) (json.RawMessage, *Error)
Handler is one Redeven business RPC handler. Payload encoding is part of the product contract; Flowersec owns the enclosing RPC transport.
type RPCRegistrar ¶
type RPCRegistrar interface {
HandleRPC(uint32, flowersec.RPCHandler) error
}
RPCRegistrar is the smallest Flowersec registration boundary shared by an endpoint-client RPCHandlers and an accepted-session SessionHandlers. Keeping this interface role-neutral prevents client code from borrowing the accepted-server stream facade.
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
Router collects immutable product handlers before Flowersec freezes the session's handler registry.
func (*Router) Bind ¶
func (router *Router) Bind(handlers RPCRegistrar) error
Bind installs the complete product handler set on Flowersec before a session is established. Unknown type IDs remain Flowersec application errors.