reactor

package
v1.65.2 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Signal_End uint8 = iota
	Signal_Ready
	Signal_Cede
)
View Source
const (
	SubsystemStatus_Fresh uint8 = iota
	SubsystemStatus_Ready
	SubsystemStatus_Ceded
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Msg

type Msg struct {
	Signal uint8
	PId    string // process node Id
}

type Options

type Options struct {
	ChUpSize int
}

type Reactor

type Reactor struct {
	Name    string
	Context context.Context
	Logger  loggerapi.ILogger
	F       func(r *Reactor, msg *Msg)
	// contains filtered or unexported fields
}

func Start

func Start(r *Reactor, _subsystems []string, of ...func(opts *Options)) *Reactor

func (*Reactor) End

func (r *Reactor) End()

func (*Reactor) Send

func (r *Reactor) Send(m *Msg)

func (*Reactor) Status

func (r *Reactor) Status() (s *Status)

use only from within the reactor func

type Status

type Status struct {
	Fresh   []string
	Ready   []string
	Ceded   []string
	AllDone bool
}

Jump to

Keyboard shortcuts

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