transport

package
v0.16.2 Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: Apache-2.0 Imports: 0 Imported by: 161 modules, 206 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 transport provides predefined transport protocol.

Index

Constants

View Source
const Unknown = "Unknown"

Unknown indicates the protocol is unknown.

Variables

This section is empty.

Functions

This section is empty.

Types

type Protocol

type Protocol int

Protocol indicates the transport protocol.

const (
	PurePayload Protocol = 0

	// TTHeader unary methods only
	TTHeader Protocol = 1 << iota

	// Framed unary methods only
	Framed

	// HTTP unary methods only
	HTTP

	// GRPC indicates all methods (including unary and streaming) using grpc protocol.
	GRPC

	// HESSIAN2 unary methods only
	HESSIAN2

	// TTHeaderStreaming indicates all streaming methods using ttheader streaming protocol,
	// and it doesn't affect the protocol of all unary methods.
	TTHeaderStreaming

	// GRPCStreaming indicates all streaming methods using grpc protocol,
	// and it doesn't affect the protocol of all unary methods.
	// NOTE: only used in global config of the client side.
	GRPCStreaming

	// TTHeaderFramed unary methods only
	TTHeaderFramed = TTHeader | Framed
)

Predefined transport protocols.

func (Protocol) String

func (tp Protocol) String() string

String prints human readable information.

Jump to

Keyboard shortcuts

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