Help us shape the future of Go! Take the 2026 Go Developer Survey

compose

package
v0.57.13 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package compose carries the project-supplied part of a host process.

A project names one Go package as its compose package in the dist and CLI compiler configs. That package exports Compose() *compose.Composition, which the generated main calls once per process. The composition owns any state its factories and commands share, such as process-wide brokers, so Bldr wires project controllers without knowing their types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddFactoriesFunc

type AddFactoriesFunc = func(b bus.Bus) []controller.Factory

AddFactoriesFunc constructs controller factories bound to a host bus.

type Composition

type Composition struct {
	// Factories construct the project's controller factories on each host bus.
	Factories []AddFactoriesFunc
	// Commands build the project's CLI commands.
	Commands []cli_entrypoint.BuildCommandsFunc
}

Composition is the project-supplied part of a native host process.

func (*Composition) AddFactories

func (c *Composition) AddFactories(b bus.Bus, sr *static.Resolver)

AddFactories adds the composition's factories to a host bus resolver. A nil composition adds nothing.

Jump to

Keyboard shortcuts

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