Documentation ¶
Overview ¶
Package detection protocol detection, it is used for a scenario that switching KitexProtobuf to gRPC. No matter KitexProtobuf or gRPC the server side can handle with this detection handler.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSvrTransHandlerFactory ¶
func NewSvrTransHandlerFactory(defaultHandlerFactory remote.ServerTransHandlerFactory, detectableHandlerFactory ...remote.ServerTransHandlerFactory, ) remote.ServerTransHandlerFactory
NewSvrTransHandlerFactory detection factory construction. Each detectableHandlerFactory should return a ServerTransHandler which implements DetectableServerTransHandler after called NewTransHandler.
Types ¶
type DetectableServerTransHandler ¶ added in v0.6.0
type DetectableServerTransHandler interface { remote.ServerTransHandler ProtocolMatch(ctx context.Context, conn net.Conn) (err error) }
DetectableServerTransHandler implements an additional method ProtocolMatch to help DetectionHandler to judge which serverHandler should handle the request data.
Click to show internal directories.
Click to hide internal directories.