Documentation
¶
Index ¶
Constants ¶
View Source
const ( XVersion = "X-RPCX-Version" XMessageType = "X-RPCX-MesssageType" XHeartbeat = "X-RPCX-Heartbeat" XOneway = "X-RPCX-Oneway" XMessageStatusType = "X-RPCX-MessageStatusType" XSerializeType = "X-RPCX-SerializeType" XMessageID = "X-RPCX-MessageID" XServicePath = "X-RPCX-ServicePath" XServiceMethod = "X-RPCX-ServiceMethod" XMeta = "X-RPCX-Meta" XErrorMessage = "X-RPCX-ErrorMessage" )
View Source
const ( HTTP1 ServerType = "http1" HTTP2 = "http2" HTTP2c = "h2c" )
Variables ¶
View Source
var HttpCode int // HTTP状态码
Functions ¶
func HttpRequest2RpcxRequest ¶
Types ¶
type Gateway ¶
type Gateway struct { // http listen address Addr string ServerType ServerType FailMode client.FailMode SelectMode client.SelectMode Option client.Option // contains filtered or unexported fields }
func NewGateway ¶
func NewGateway(addr string, st ServerType, sd client.ServiceDiscovery, failMode client.FailMode, selectMode client.SelectMode, option client.Option) *Gateway
type ServerType ¶
type ServerType string
Click to show internal directories.
Click to hide internal directories.