Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewStreamAsConn ¶
func NewStreamAsConn(s ClientOrServerStream) io.ReadWriteCloser
用于把 GRPC STREAM 连接转换成连续的 读/写 接口。
Types ¶
type ClientOrServerStream ¶
type ClientOrServerStream interface { Send(*proto.DialRemoteMessage) error Recv() (*proto.DialRemoteMessage, error) }
type DialRemoteRequest ¶
type DialRemoteRequest struct {
Addr string
}
type DialRemoteResponse ¶
type DialRemoteResponse struct {
Error string
}
type RemoteDialerManager ¶
type RemoteDialerManager struct {
// contains filtered or unexported fields
}
func NewRemoteDialerManager ¶
func NewRemoteDialerManager(s ClientOrServerStream) *RemoteDialerManager
func (*RemoteDialerManager) Dial ¶
func (m *RemoteDialerManager) Dial(addr string) (net.Conn, error)
func (*RemoteDialerManager) Run ¶
func (m *RemoteDialerManager) Run() error
type StreamAsConn ¶
type StreamAsConn struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.