github.com/XiaoMi/Gaea@v1.2.5/util/mocks/pipeTest/assets/pipeTest的类图.txt (about)

     1  @startuml
     2  
     3  class pipeTest.DcMocker {
     4      - testing.T t
     5      - *bufio.Reader bufReader
     6      - *bufio.Writer bufWriter
     7      - Conn connRead
     8      - Conn connWrite
     9      - sync.WaitGroup wg
    10      - ReplyFuncType replyFunc
    11      - error err
    12      GetConnRead() net.Conn
    13      GetConnWrite() net.Conn
    14      GetBufReader() *bufio.Reader
    15      GetBufWriter() *bufio.Writer
    16      OverwriteConnBufRead(connRead net.Conn, bufReader *bufio.Reader) error
    17      OverwriteConnBufWrite(connWrite net.Conn, bufWriter *bufio.Writer) error
    18      ResetDcMockers(otherSide *DcMocker) error
    19      SendOrReceive(data []uint8) *DcMocker
    20      Reply(otherSide *DcMocker) (msg []uint8)
    21      WaitAndReset(otherSide *DcMocker) error
    22  }
    23  
    24  class testing.T {}
    25  class bufio.Reader {}
    26  class bufio.Writer {}
    27  class net.Conn {}
    28  class sync.WaitGroup {}
    29  
    30  pipeTest.DcMocker "1" o-- "1" testing.T
    31  pipeTest.DcMocker "1" *-- "1" bufio.Reader
    32  pipeTest.DcMocker "1" *-- "1" bufio.Writer
    33  pipeTest.DcMocker "1" *-- "2" net.Conn
    34  pipeTest.DcMocker "1" *-- "1" sync.WaitGroup
    35  
    36  note top of pipeTest.DcMocker
    37      DcMocker 为 模拟连用的类
    38  end note
    39  
    40  note bottom of testing.T
    41      T 为 测试用的类
    42  end note
    43  
    44  note bottom of bufio.Reader
    45      Reader 为有缓存的传送
    46  end note
    47  
    48  note bottom of bufio.Writer
    49      Writer 为有缓存的接收
    50  end note
    51  
    52  note bottom of net.Conn
    53      Conn 为传送或接收的连接
    54  end note
    55  
    56  note bottom of sync.WaitGroup
    57      WaitGroup 用来做等待连接的读写功能全部完成
    58  end note
    59  
    60  @enduml