eventqueue

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2021 License: GPL-3.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 Event

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

Event is a wrapper of function to execute in the event queue

func NewEvent added in v0.1.5

func NewEvent(exec EventExec) Event

NewEvent creates a new instance of Event

func NewEventWithCancel added in v0.1.5

func NewEventWithCancel(exec EventExec, cancel func()) Event

NewEventWithCancel creates a new instance of Event with a cancel function

type EventExec added in v0.1.5

type EventExec func()

EventExec represents some function to execute

type EventQueue

type EventQueue interface {
	Add(Event) bool
	Pop() EventExec
	ClearAndStop()
}

EventQueue is the interface for managing a queue of functions

func New

func New() EventQueue

New returns a new instance of queue

Jump to

Keyboard shortcuts

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