up

package
v1.117.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Up

func Up[S any](otdg *OTDG, name string, init_func func(name string) (S, upcommon.IRemovable)) S

Usage:

q := up.Up[*example.System01](otdg1, "Q", func(name string) (*example.System01, up.IRemovable) {
	s := &example.System01{}
	return s, s
})

q := up.Up(otdg1, "Q", func(name string) (*example.System01, up.IRemovable) {
	s := &example.System01{}
	return s, s
})

See also Up() method as equal alternative.

Types

type OTDG

type OTDG struct {
	Name   string // the name is required, since it's used in a user-side tracer when calling RecursiveWindUp()
	Tracer loggeterrapi.ITracer
	Parent upcommon.IRecursiveWindUp
	// contains filtered or unexported fields
}

One-Thread Dependencies Graph

func NewOTDG added in v1.89.0

func NewOTDG(name string, tracer loggeterrapi.ITracer, parent upcommon.IRecursiveWindUp) *OTDG

func (*OTDG) GetName added in v1.93.0

func (f *OTDG) GetName() string

func (*OTDG) RecursiveWindUp

func (otdg *OTDG) RecursiveWindUp(tracer loggeterrapi.ITracer)

Be careful if your reactor dependency graph has diamond topology (is not a DAG); In that case, better implement explicit forward action plan to wind up your system.

func (*OTDG) Up

func (otdg *OTDG) Up(name string, init_func func(name string) (any, upcommon.IRemovable)) any

Usage:

w := otdg1.Up("W", func(name string) (any, up.IRemovable) {
	s := &example.System01{}
	return s, s
}).(*example.System01)

See also Up() function as equal alternative.

func (*OTDG) WindUp

func (otdg *OTDG) WindUp(tracer loggeterrapi.ITracer)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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