events

package
v0.0.0-...-60f05a2 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: GPL-2.0 Imports: 13 Imported by: 0

README

Builtins: event

A rudimentary event system for murex

Documentation

Overview

Package events provides a basic event framework for murex

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddEventType

func AddEventType(eventTypeName string, handlerInterface eventType, err error) error

AddEventType registers your event type handlers

func Callback

func Callback(name string, interrupt interface{}, block []rune, fileRef *ref.File, stdout, stderr stdio.Io, evtReturn any, background bool) (any, error)

Callback is a generic function your event handlers types should hook into so murex functions can remain consistent.

func CompileInterruptKey

func CompileInterruptKey(interrupt, name string) string

func DumpEventTypes

func DumpEventTypes() []string

func DumpEvents

func DumpEvents() (dump map[string]interface{})

DumpEvents is used for `runtime` to output all the saved events

Types

type DumpT

type DumpT struct {
	Interrupt string
	Block     string
	FileRef   *ref.File
}

type Key

type Key struct {
	Name      string
	Interrupt string
}

func GetInterruptFromKey

func GetInterruptFromKey(key string) *Key

GetInterruptFromKey returns: name, interrupt

Jump to

Keyboard shortcuts

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