js

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChannelReader

type ChannelReader struct {
	// contains filtered or unexported fields
}

ChannelReader is a reader that reads from a channel of bytes.

func NewChannelReader

func NewChannelReader(source <-chan []byte, cancelFn context.CancelFunc) *ChannelReader

NewChannelReader creates a new ChannelReader from a channel.

Second argument is optional function that will be called when `Close` method is called.

func (*ChannelReader) Close

func (listener *ChannelReader) Close() error

func (*ChannelReader) Read

func (listener *ChannelReader) Read(b []byte) (n int, err error)

Jump to

Keyboard shortcuts

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