Documentation ¶
Overview ¶
Package channel provides utilities to create an Bubbletea model compatible with Go channels.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DisposeMsg ¶
type DisposeMsg[T any] struct{}
DisposeMsg is a signal used to close the channel of the Model.
type Model ¶
type Model[T any] struct { Channel chan T // OnInit is used to insert data into the channel and initialize the dispose method. OnInit func(chan T) func() error // contains filtered or unexported fields }
Model is the object used to implement a bubbletea model with a channel.
func (*Model[T]) Dispose ¶
Dispose is the signal that closes the model and executes the dispose function.
Click to show internal directories.
Click to hide internal directories.