channel

package
v1.0.0-alpha.11 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: LGPL-3.0 Imports: 1 Imported by: 0

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{}

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
}

func (*Model[T]) Dispose

func (m *Model[T]) Dispose() tea.Msg

func (Model[T]) Init

func (m Model[T]) Init() tea.Cmd

func (Model[T]) Update

func (m Model[T]) Update(msg tea.Msg) (Model[T], tea.Cmd)

Jump to

Keyboard shortcuts

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