factory

package
v0.0.0-...-a733917 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultMsgBufSize = 1024 * 1024 // 1 MB
)

Variables

This section is empty.

Functions

func New

New creates a new factory module.

Types

type ModuleGenerator

type ModuleGenerator func(id t.ModuleID, params any) (modules.PassiveModule, error)

ModuleGenerator is a function that generates a passive module from a module ID and the parameters. TODO: Change the params type from any to stdtypes.Serializable when legacy proto events are not used with factory.

type ModuleParams

type ModuleParams struct {
	Generator  ModuleGenerator
	MsgBufSize int
}

ModuleParams contains the parameters for creating a factory module.

func DefaultParams

func DefaultParams(generator ModuleGenerator) ModuleParams

DefaultParams creates a valid ModuleParams with default values.

Jump to

Keyboard shortcuts

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