jsonstream

package
v0.4.10 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecuteStreamingHttpPostRequest

func ExecuteStreamingHttpPostRequest[T any](
	ctx context.Context,
	client *http.Client,
	url string,
	stream stream.Stream[T],
) (*http.Response, error)

func ReadJsonArray

func ReadJsonArray[T any](readCloserProvider func(ctx context.Context) (io.ReadCloser, error)) stream.Stream[T]

func ReadJsonObject

func ReadJsonObject[T any](readCloserProvider func(ctx context.Context) (io.ReadCloser, error)) stream.Stream[shpanstream.Entry[string, T]]

func StreamJsonAsReaderAndReturn

func StreamJsonAsReaderAndReturn[T any, V any](
	ctx context.Context,
	stream stream.Stream[T],
	consumer func(ctx context.Context, r io.Reader) (V, error),
) (V, error)

func StreamJsonToHttpResponseWriter

func StreamJsonToHttpResponseWriter[T any](ctx context.Context, w http.ResponseWriter, stream stream.Stream[T]) error

func StreamJsonToWriter

func StreamJsonToWriter[T any](ctx context.Context, w io.Writer, stream stream.Stream[T]) error

func StreamJsonToWriterWithInit

func StreamJsonToWriterWithInit[T any](
	ctx context.Context,
	w io.Writer,
	stream stream.Stream[T],
	initFunc func() error,
) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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