Documentation ¶
Overview ¶
Package endpoint is transport implement of different protocol.
Index ¶
- Constants
- Variables
- func GenerateRequestID() uint64
- func GetRequestGroup(r motan.Request) string
- func RegistDefaultEndpoint(extFactory motan.ExtentionFactory)
- func VerifyConfig(config *Config) error
- type Channel
- type ChannelPool
- type Config
- type ConnFactory
- type GrpcEndPoint
- func (g *GrpcEndPoint) Call(request motan.Request) motan.Response
- func (g *GrpcEndPoint) Destroy()
- func (g *GrpcEndPoint) GetName() string
- func (g *GrpcEndPoint) GetURL() *motan.URL
- func (g *GrpcEndPoint) Initialize()
- func (g *GrpcEndPoint) IsAvailable() bool
- func (g *GrpcEndPoint) SetProxy(proxy bool)
- func (g *GrpcEndPoint) SetSerialization(s motan.Serialization)
- func (g *GrpcEndPoint) SetURL(url *motan.URL)
- type MockEndpoint
- func (m *MockEndpoint) Call(request motan.Request) motan.Response
- func (m *MockEndpoint) Destroy()
- func (m *MockEndpoint) GetName() string
- func (m *MockEndpoint) GetURL() *motan.URL
- func (m *MockEndpoint) IsAvailable() bool
- func (m *MockEndpoint) SetProxy(proxy bool)
- func (m *MockEndpoint) SetSerialization(s motan.Serialization)
- func (m *MockEndpoint) SetURL(url *motan.URL)
- type MotanEndpoint
- func (m *MotanEndpoint) Call(request motan.Request) motan.Response
- func (m *MotanEndpoint) Destroy()
- func (m *MotanEndpoint) GetName() string
- func (m *MotanEndpoint) GetURL() *motan.URL
- func (m *MotanEndpoint) Initialize()
- func (m *MotanEndpoint) IsAvailable() bool
- func (m *MotanEndpoint) SetProxy(proxy bool)
- func (m *MotanEndpoint) SetSerialization(s motan.Serialization)
- func (m *MotanEndpoint) SetURL(url *motan.URL)
- type OutMsg
- type Stream
Constants ¶
View Source
const ( Grpc = "grpc" Motan2 = "motan2" Mock = "mockEndpoint" )
ext name
View Source
const (
GRPCSerialNum = 1
)
Variables ¶
Functions ¶
func GenerateRequestID ¶
func GenerateRequestID() uint64
func GetRequestGroup ¶
func RegistDefaultEndpoint ¶
func RegistDefaultEndpoint(extFactory motan.ExtentionFactory)
func VerifyConfig ¶
Types ¶
type Channel ¶
type Channel struct {
// contains filtered or unexported fields
}
type ChannelPool ¶
type ChannelPool struct {
// contains filtered or unexported fields
}
func NewChannelPool ¶
func NewChannelPool(poolCap int, factory ConnFactory, config *Config, serialization motan.Serialization) (*ChannelPool, error)
func (*ChannelPool) Close ¶
func (c *ChannelPool) Close() error
func (*ChannelPool) Get ¶
func (c *ChannelPool) Get() (*Channel, error)
type ConnFactory ¶
type GrpcEndPoint ¶
type GrpcEndPoint struct {
// contains filtered or unexported fields
}
func (*GrpcEndPoint) Destroy ¶
func (g *GrpcEndPoint) Destroy()
func (*GrpcEndPoint) GetName ¶
func (g *GrpcEndPoint) GetName() string
func (*GrpcEndPoint) GetURL ¶
func (g *GrpcEndPoint) GetURL() *motan.URL
func (*GrpcEndPoint) Initialize ¶
func (g *GrpcEndPoint) Initialize()
func (*GrpcEndPoint) IsAvailable ¶
func (g *GrpcEndPoint) IsAvailable() bool
func (*GrpcEndPoint) SetProxy ¶
func (g *GrpcEndPoint) SetProxy(proxy bool)
func (*GrpcEndPoint) SetSerialization ¶
func (g *GrpcEndPoint) SetSerialization(s motan.Serialization)
func (*GrpcEndPoint) SetURL ¶
func (g *GrpcEndPoint) SetURL(url *motan.URL)
type MockEndpoint ¶
func (*MockEndpoint) Destroy ¶
func (m *MockEndpoint) Destroy()
func (*MockEndpoint) GetName ¶
func (m *MockEndpoint) GetName() string
func (*MockEndpoint) GetURL ¶
func (m *MockEndpoint) GetURL() *motan.URL
func (*MockEndpoint) IsAvailable ¶
func (m *MockEndpoint) IsAvailable() bool
func (*MockEndpoint) SetProxy ¶
func (m *MockEndpoint) SetProxy(proxy bool)
func (*MockEndpoint) SetSerialization ¶
func (m *MockEndpoint) SetSerialization(s motan.Serialization)
func (*MockEndpoint) SetURL ¶
func (m *MockEndpoint) SetURL(url *motan.URL)
type MotanEndpoint ¶
type MotanEndpoint struct {
// contains filtered or unexported fields
}
func (*MotanEndpoint) Destroy ¶
func (m *MotanEndpoint) Destroy()
func (*MotanEndpoint) GetName ¶
func (m *MotanEndpoint) GetName() string
func (*MotanEndpoint) GetURL ¶
func (m *MotanEndpoint) GetURL() *motan.URL
func (*MotanEndpoint) Initialize ¶
func (m *MotanEndpoint) Initialize()
func (*MotanEndpoint) IsAvailable ¶
func (m *MotanEndpoint) IsAvailable() bool
func (*MotanEndpoint) SetProxy ¶
func (m *MotanEndpoint) SetProxy(proxy bool)
func (*MotanEndpoint) SetSerialization ¶
func (m *MotanEndpoint) SetSerialization(s motan.Serialization)
func (*MotanEndpoint) SetURL ¶
func (m *MotanEndpoint) SetURL(url *motan.URL)
type Stream ¶
type Stream struct {
// contains filtered or unexported fields
}
func (*Stream) SetDeadline ¶
Click to show internal directories.
Click to hide internal directories.