detection

package
v0.11.3-genericstreaming Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2024 License: Apache-2.0 Imports: 5 Imported by: 8 modules, 7 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL