github.com/nyan233/littlerpc@v0.4.6-0.20230316182519-0c8d5c48abaf/core/common/stream/stream.go (about) 1 package stream 2 3 import ( 4 "github.com/nyan233/littlerpc/core/common/transport" 5 ) 6 7 type LStream interface { 8 RecvMsg(data interface{}) error 9 SendMsg(data interface{}) error 10 Close(flag int) error 11 } 12 13 type LStreamFactory interface { 14 getLStreamConn() (transport.ConnAdapter, error) 15 } 16 17 func NewLStream(factory LStreamFactory) (LStream, error) { 18 return nil, nil 19 }