chanwriter

package
v0.0.0-...-9947234 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Read

func Read(w *ChanWriter, onNewData func(bytes []byte) tea.Msg) tea.Cmd

Read reads from the channel and calls the onNewData function with the data

Types

type ChanWriter

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

ChanWriter is a writer that writes to a channel after a debounced period

func New

func New() *ChanWriter

func (*ChanWriter) Close

func (w *ChanWriter) Close() error

Close the writer

func (*ChanWriter) Flush

func (w *ChanWriter) Flush()

Flush the writer

func (*ChanWriter) Write

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

Write implements io.Writer

Jump to

Keyboard shortcuts

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