stream

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 20, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ReadResponse

type ReadResponse interface {
	GetBody() []byte
}

type ReadStream

type ReadStream[T ReadResponse] interface {
	Recv() (T, error)
}

type Reader

type Reader[T ReadResponse] struct {
	// contains filtered or unexported fields
}

func NewReader

func NewReader[T ReadResponse](stream ReadStream[T]) *Reader[T]

func (*Reader[T]) Read

func (r *Reader[T]) Read(p []byte) (n int, err error)

type WriteStream

type WriteStream[T any] interface {
	Send(sendRequest T) error
}

type Writer

type Writer[T any] struct {
	// contains filtered or unexported fields
}

func NewWriter

func NewWriter[T any](factory func(body []byte) T, stream WriteStream[T]) *Writer[T]

func (*Writer[T]) Write

func (w *Writer[T]) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL