kubernetes/vendor/github.com/moby/spdystream/stream.go

var ErrUnreadPartialData

type Stream

// WriteData writes data to stream, sending a dataframe per call
func (s *Stream) WriteData(data []byte, fin bool) error {}

// Write writes bytes to a stream, calling write data for each call.
func (s *Stream) Write(data []byte) (n int, err error) {}

// Read reads bytes from a stream, a single read will never get more
// than what is sent on a single data frame, but a multiple calls to
// read may get data from the same data frame.
func (s *Stream) Read(p []byte) (n int, err error) {}

// ReadData reads an entire data frame and returns the byte array
// from the data frame.  If there is unread data from the result
// of a Read call, this function will return an ErrUnreadPartialData.
func (s *Stream) ReadData() ([]byte, error) {}

func (s *Stream) waitWriteReply() {}

// Wait waits for the stream to receive a reply.
func (s *Stream) Wait() error {}

// WaitTimeout waits for the stream to receive a reply or for timeout.
// When the timeout is reached, ErrTimeout will be returned.
func (s *Stream) WaitTimeout(timeout time.Duration) error {}

// Close closes the stream by sending an empty data frame with the
// finish flag set, indicating this side is finished with the stream.
func (s *Stream) Close() error {}

// Reset sends a reset frame, putting the stream into the fully closed state.
func (s *Stream) Reset() error {}

func (s *Stream) resetStream() error {}

// CreateSubStream creates a stream using the current as the parent
func (s *Stream) CreateSubStream(headers http.Header, fin bool) (*Stream, error) {}

// SetPriority sets the stream priority, does not affect the
// remote priority of this stream after Open has been called.
// Valid values are 0 through 7, 0 being the highest priority
// and 7 the lowest.
func (s *Stream) SetPriority(priority uint8) {}

// SendHeader sends a header frame across the stream
func (s *Stream) SendHeader(headers http.Header, fin bool) error {}

// SendReply sends a reply on a stream, only valid to be called once
// when handling a new stream
func (s *Stream) SendReply(headers http.Header, fin bool) error {}

// Refuse sends a reset frame with the status refuse, only
// valid to be called once when handling a new stream.  This
// may be used to indicate that a stream is not allowed
// when http status codes are not being used.
func (s *Stream) Refuse() error {}

// Cancel sends a reset frame with the status canceled. This
// can be used at any time by the creator of the Stream to
// indicate the stream is no longer needed.
func (s *Stream) Cancel() error {}

// ReceiveHeader receives a header sent on the other side
// of the stream.  This function will block until a header
// is received or stream is closed.
func (s *Stream) ReceiveHeader() (http.Header, error) {}

// Parent returns the parent stream
func (s *Stream) Parent() *Stream {}

// Headers returns the headers used to create the stream
func (s *Stream) Headers() http.Header {}

// String returns the string version of stream using the
// streamId to uniquely identify the stream
func (s *Stream) String() string {}

// Identifier returns a 32 bit identifier for the stream
func (s *Stream) Identifier() uint32 {}

// IsFinished returns whether the stream has finished
// sending data
func (s *Stream) IsFinished() bool {}

func (s *Stream) LocalAddr() net.Addr {}

func (s *Stream) RemoteAddr() net.Addr {}

func (s *Stream) SetDeadline(t time.Time) error {}

func (s *Stream) SetReadDeadline(t time.Time) error {}

func (s *Stream) SetWriteDeadline(t time.Time) error {}

func (s *Stream) closeRemoteChannels() {}