callstack

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CallStack

type CallStack struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewCallStack

func NewCallStack() *CallStack

Create new CallStack

func (*CallStack) Add

func (c *CallStack) Add(fn CallableFn)

Add a callback

func (*CallStack) IsCalling

func (c *CallStack) IsCalling() bool

returns true if in call loop

func (*CallStack) Run

func (c *CallStack) Run(abortOnError bool) error

Run all callbacks in reverse order

func (*CallStack) RunLinear

func (c *CallStack) RunLinear(abortOnError bool) error

run all callbacks in sequential order

type CallableFn

type CallableFn func() error

CallStack callable

Jump to

Keyboard shortcuts

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