constant

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2022 License: Apache-2.0 Imports: 1 Imported by: 67

Documentation

Index

Constants

View Source
const (
	// TRIPLE is triple protocol name
	TRIPLE = "tri"

	// DefaultHttp2ControllerReadBufferSize is default read buffer size of triple client/server
	DefaultHttp2ControllerReadBufferSize = 4096

	// DefaultTimeout is default timeout seconds of triple client
	DefaultTimeout = time.Second * 3

	// DefaultListeningAddress is default listening address
	DefaultListeningAddress = "127.0.0.1:20001"
)

transfer

View Source
const (
	// PBCodecName is the default serializer name, triple use pb as serializer.
	PBCodecName = CodecType("protobuf")

	// HessianCodecName is the serializer with pb wrapped with hessian2
	HessianCodecName = CodecType("hessian2")

	// MsgPackCodecName is the serializer with pb wrapped with msgpack
	MsgPackCodecName = CodecType("msgpack")

	// JSONMapStructCodec is the serializer jsonCodec
	JSONMapStructCodec = CodecType("jsonMapStruct")
)
View Source
const (
	InterfaceKey     = TripleCtxKey("interface")
	CtxAttachmentKey = TripleCtxKey("attachment")
	TrailerKey       = "Trailer"
)
View Source
const (
	// TrailerKeyGrpcStatus is a trailer header field to response grpc code (int).
	TrailerKeyGrpcStatus = "grpc-status"

	// TrailerKeyGrpcMessage is a trailer header field to response grpc error message.
	TrailerKeyGrpcMessage = "grpc-message"

	// TrailerKeyGrpcDetailsBin is a trailer header field to response grpc details bin message encoded by base64
	TrailerKeyGrpcDetailsBin = "grpc-status-details-bin"

	// TrailerKeyTraceProtoBin is triple trailer header
	TrailerKeyTraceProtoBin = "trace-proto-bin"

	// TrailerKeyHttp2Status is http2 pkg trailer key of success
	TrailerKeyHttp2Status = "http2-status"

	// TrailerKeyHttp2Message is http2 pkg trailer key of error message
	TrailerKeyHttp2Message = "http2-message"
)

TrailerKeys are to make triple compatible with grpc After server returning the rsp header and body, it returns Trailer header in the end, to send grpc status of this invocation.

View Source
const (
	TripleContentType    = "application/grpc+proto"
	TripleUserAgent      = "grpc-go/1.35.0-dev"
	TripleServiceVersion = "tri-service-version"
	TripleAttachement    = "tri-attachment"
	TripleServiceGroup   = "tri-service-group"
	TripleRequestID      = "tri-req-id"
	TripleTraceID        = "tri-trace-traceid"
	TripleTraceRPCID     = "tri-trace-rpcid"
	TripleTraceProtoBin  = "tri-trace-proto-bin"
	TripleUnitInfo       = "tri-unit-info"
)

Header keys are header field key from client

View Source
const (
	// DefaultNumWorkers #workers for connection pool
	DefaultNumWorkers = 720
)

gr pool

View Source
const (
	ProxyServiceKey = "github.com.dubbogo.triple.proxy"
)

proxy interface

Variables

This section is empty.

Functions

This section is empty.

Types

type CodecType

type CodecType string

CodecType is the type of triple serializer

type TripleCtxKey

type TripleCtxKey string

TripleCtxKey is typ of content key

Jump to

Keyboard shortcuts

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