modular

package
v1.119.1-rc Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close(ctx context.Context, ball *mud.Ball, selector mud.ComponentSelector) (err error)

Close closes all the resources.

func CreateSelector

func CreateSelector(ball *mud.Ball) mud.ComponentSelector

CreateSelector create a custom component hierarchy selector based on environment variables. This is the way how it is possible to replace components of the process or disable existing ones.

func CreateSelectorFromString added in v1.118.4

func CreateSelectorFromString(ball *mud.Ball, selection string) mud.ComponentSelector

CreateSelectorFromString creates a custom component hierarchy selector based on the provided string + adjust module hierarchy. selection should be a coma separated list of the following: * simple component name (like: debug.Wrapper) to include it with all the dependencies * component name with - prefix to exclude it from previous selection * interface=implementation to choose from already registered implementations * !component to disable interface (inject nil instead of any implementation).

func IdentityModule

func IdentityModule(ball *mud.Ball)

IdentityModule provides identity related components for modular setup.

func Initialize

func Initialize(ctx context.Context, ball *mud.Ball, selector mud.ComponentSelector) (err error)

Initialize creates all the requested components.

func Run

func Run(ctx context.Context, ball *mud.Ball, selector mud.ComponentSelector) (err error)

Run runs storage node until it's either closed or it errors.

Types

type Service

type Service struct{}

Service is a marker annotation for all components which should be started (with all the dependencies).

func (Service) String

func (s Service) String() string

type StopTrigger

type StopTrigger struct {
	Cancel context.CancelFunc
}

StopTrigger is a helper to stop all the components and finish the process. Just call cancel.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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