app

package
v0.0.0-...-8dc85f3 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Props

func Props() *actor.Props

func Register

func Register(name string, factory FactoryFunc) error

Register registers the given factory with the given name. It returns an error if a factory with the same name is already registered, if the name is empty or if the factory is nil.

func RegisterMust

func RegisterMust(name string, factory FactoryFunc)

RegisterMust registers the given factory with the given name. It panics if a factory with the same name is already registered, if the name is empty or if the factory is nil.

func Seq

func Seq() iter.Seq2[string, FactoryFunc]

Seq returns a function that iterates over the registry with a callback.

Types

type Controller

type Controller struct {
	middleware.SpawnAwareMixin
}

Controller is the actor responsible for managing the lifecycle of the applications.

func (*Controller) Receive

func (state *Controller) Receive(context actor.Context)

type FactoryFunc

type FactoryFunc func(config any) actor.Producer

FactoryFunc creates an actor producer for a given configuration. The configuration is an arbitrary value that is passed to the factory function and that is used to create the application actor.

type Registry

type Registry map[string]FactoryFunc

Registry maps application names to their factory functions.

Jump to

Keyboard shortcuts

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