loop

package
v1.1.10 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchMsg

type BatchMsg []Cmd

type Cmd

type Cmd func() Msg

func Batch

func Batch(cmds ...Cmd) Cmd

func Quit

func Quit(err error) Cmd

func Sequence

func Sequence(cmds ...Cmd) Cmd

type EventLoop

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

func NewEventLoop

func NewEventLoop(updateFunc func(msg Msg) Cmd) EventLoop

func (*EventLoop) Run

func (l *EventLoop) Run(ctx context.Context, initCmd Cmd) (err error)

func (*EventLoop) Send

func (l *EventLoop) Send(msg Msg)

type Msg

type Msg any

type QuitMsg

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

type SequenceMsg

type SequenceMsg []Cmd

Jump to

Keyboard shortcuts

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