{"modulePath":"github.com/wavetermdev/waveterm","version":"v0.14.5","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package streamclient\n\n## Types\n\n```go\ntype AckSender interface {\n\tSendAck(ackPk wshrpc.CommandStreamAckData)\n}\n```\n\n```go\ntype Broker struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewBroker(rpcClient StreamRpcInterface) *Broker\n```\n\n```go\nfunc (b *Broker) AttachStreamWriter(meta *wshrpc.StreamMeta, writer StreamWriter) error\n```\n\n```go\nfunc (b *Broker) Close()\n```\n\n```go\nfunc (b *Broker) CreateStreamReader(readerRoute string, writerRoute string, rwnd int64) (*Reader, *wshrpc.StreamMeta)\n```\n\n```go\nfunc (b *Broker) CreateStreamReaderWithSeq(readerRoute string, writerRoute string, rwnd int64, startSeq int64) (*Reader, *wshrpc.StreamMeta)\n```\n\n```go\nfunc (b *Broker) CreateStreamWriter(meta *wshrpc.StreamMeta) (*Writer, error)\n```\n\n```go\nfunc (b *Broker) DetachStreamWriter(streamId string)\n```\n\n```go\nfunc (b *Broker) RecvAck(ackPk wshrpc.CommandStreamAckData)\n```\n\n```go\nfunc (b *Broker) RecvData(dataPk wshrpc.CommandStreamData)\n```\nRecvData and RecvAck are designed to be non-blocking and must remain so to prevent deadlock. They only enqueue work items to be processed asynchronously by the work queue's goroutine. These methods are called from the main RPC runServer loop, so blocking here would stall all RPC processing.\n\n```go\nfunc (b *Broker) SendAck(ackPk wshrpc.CommandStreamAckData)\n```\n\n```go\nfunc (b *Broker) SendData(dataPk wshrpc.CommandStreamData)\n```\n\n```go\ntype DataSender interface {\n\tSendData(dataPk wshrpc.CommandStreamData)\n}\n```\n\n```go\ntype Reader struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewReader(id string, readWindow int64, ackSender AckSender) *Reader\n```\n\n```go\nfunc NewReaderWithSeq(id string, readWindow int64, startSeq int64, ackSender AckSender) *Reader\n```\n\n```go\nfunc (r *Reader) Close() error\n```\n\n```go\nfunc (r *Reader) Read(p []byte) (int, error)\n```\n\n```go\nfunc (r *Reader) RecvData(dataPk wshrpc.CommandStreamData)\n```\n\n```go\nfunc (r *Reader) UpdateNextSeq(newSeq int64)\n```\n\n```go\ntype StreamRpcInterface interface {\n\tStreamDataAckCommand(data wshrpc.CommandStreamAckData, opts *wshrpc.RpcOpts) error\n\tStreamDataCommand(data wshrpc.CommandStreamData, opts *wshrpc.RpcOpts) error\n}\n```\n\n```go\ntype StreamWriter interface {\n\tRecvAck(ackPk wshrpc.CommandStreamAckData)\n}\n```\n\n```go\ntype Writer struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewWriter(id string, readWindow int64, dataSender DataSender) *Writer\n```\n\n```go\nfunc (w *Writer) Close() error\n```\nIf Close() is called while a Write is blocked, the Write will return an error and buffered data may be discarded.\n\n```go\nfunc (w *Writer) CloseWithError(err error) error\n```\nIf CloseWithError() is called while a Write is blocked, the Write will return an error and buffered data may be discarded.\n\n```go\nfunc (w *Writer) GetAckState() (maxAckedSeq int64, finAcked bool, canceled bool)\n```\n\n```go\nfunc (w *Writer) GetCanceledChan() \u003c-chan struct{}\n```\n\n```go\nfunc (w *Writer) RecvAck(ackPk wshrpc.CommandStreamAckData)\n```\n\n```go\nfunc (w *Writer) Write(p []byte) (int, error)\n```\n\n","path":"github.com/wavetermdev/waveterm/pkg/streamclient","name":"streamclient","synopsis":"","isRedistributable":true}
