MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / CreateStreamWriter

Method CreateStreamWriter

pkg/streamclient/streambroker.go:102–109  ·  view source on GitHub ↗
(meta *wshrpc.StreamMeta)

Source from the content-addressed store, hash-verified

100}
101
102func (b *Broker) CreateStreamWriter(meta *wshrpc.StreamMeta) (*Writer, error) {
103 writer := NewWriter(meta.Id, meta.RWnd, b)
104 err := b.AttachStreamWriter(meta, writer)
105 if err != nil {
106 return nil, err
107 }
108 return writer, nil
109}
110
111func (b *Broker) SendAck(ackPk wshrpc.CommandStreamAckData) {
112 b.sendQueue.Enqueue(workItem{workType: "sendack", ackPk: ackPk})

Callers 10

TestBrokerBasicReadWriteFunction · 0.80
TestBrokerEOFFunction · 0.80
TestBrokerFlowControlFunction · 0.80
TestBrokerErrorFunction · 0.80
TestBrokerCancelFunction · 0.80
TestBrokerMultipleWritesFunction · 0.80
TestBrokerCleanupFunction · 0.80
runWriterModeFunction · 0.80

Calls 2

AttachStreamWriterMethod · 0.95
NewWriterFunction · 0.85

Tested by 7

TestBrokerBasicReadWriteFunction · 0.64
TestBrokerEOFFunction · 0.64
TestBrokerFlowControlFunction · 0.64
TestBrokerErrorFunction · 0.64
TestBrokerCancelFunction · 0.64
TestBrokerMultipleWritesFunction · 0.64
TestBrokerCleanupFunction · 0.64