build

package module
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2026 License: EUPL-1.2 Imports: 2 Imported by: 0

Documentation

Overview

Package build is the root entry point for the go-build orchestration surface — composes pkg/{api, events, release, sdk, service, storage} into one Core-registerable Service per Mantis #1336.

The subpackages are layers of one product (the dev/build orchestrator), not unrelated domains — Athena's #1336 adjudication 2026-05-10 placed go-build in the "Option A: lift root composer" cohort with 90% confidence. This file is the root composer; service.go holds the canonical NewService + Register surface.

c, _ := core.New(
    core.WithService(build.NewService(build.ServiceOptions{})),
)
svc := core.MustServiceFor[*build.Service](c, "build")
mgr := svc.Manager  // == buildservice.NewManager() result

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewService

func NewService(opts ServiceOptions) func(*core.Core) core.Result

NewService returns a factory that constructs the root build *Service holding a live buildservice.Manager and registers it under "build" via core.WithService.

Usage example:

core.WithService(build.NewService(build.ServiceOptions{}))

The Manager is always wired (no credentials needed) so consumers can reach it immediately via core.MustServiceFor[*build.Service](c, "build").Manager.

Note: this does NOT register the `core service` command tree — that's servicecmd.AddServiceCommands(c)'s job and stays an explicit caller responsibility (the build CLI has multiple cmd subdirs each with its own AddXxxCommands, registered by the cmd binary, not the library).

Example
// NewService returns a factory; call it with a Core to build the *Service.
factory := NewService(ServiceOptions{})
_ = factory(core.New())

func Register

func Register(c *core.Core) core.Result

Register wires the root build service into the Core with default ServiceOptions — the imperative-style alternative to NewService.

c := core.New()
if r := build.Register(c); !r.OK { return r }
Example
// Register wires the build service into a Core with default options.
_ = Register(core.New())

Types

type Service

type Service struct {
	*core.ServiceRuntime[ServiceOptions]
	// Manager is the live build orchestrator. Always non-nil — constructed
	// via buildservice.NewManager() during NewService.
	Manager buildservice.Manager
}

Service is the root build service handle — composes the existing pkg/service.Manager (the de-facto orchestrator surface from pkg/service/manager.go) under a Core-registerable identity.

Usage example: `svc := core.MustServiceFor[*build.Service](c, "build"); _ = svc.Manager`

Example
// The root build Service holds the live orchestrator Manager.
svc := NewService(ServiceOptions{})(core.New()).Value.(*Service)
_ = svc.Manager

type ServiceOptions

type ServiceOptions struct{}

ServiceOptions configures the root build service. v1 has no fields — the underlying buildservice.Manager + servicecmd command tree are configured via the Core's standard config layer (resolved by buildservice.ResolveConfig at command-execution time, not at service-registration time). Future fields (e.g. ProjectRoot override, disable specific subpackages) land here as needed.

Directories

Path Synopsis
cmd
build
Package buildcmd registers auto-detected project build commands.
Package buildcmd registers auto-detected project build commands.
ci
Package ci registers release lifecycle commands.
Package ci registers release lifecycle commands.
sdk
Package sdkcmd provides SDK generation, validation, and API compatibility commands.
Package sdkcmd provides SDK generation, validation, and API compatibility commands.
service
Package servicecmd registers background service and daemon commands.
Package servicecmd registers background service and daemon commands.
internal
ax
buildtest
Package buildtest contains shared checks for build package tests.
Package buildtest contains shared checks for build package tests.
cli
testassert
Package testassert provides small assertion predicates shared by tests.
Package testassert provides small assertion predicates shared by tests.
Package locales embeds translation files for this module.
Package locales embeds translation files for this module.
pkg
api
Package api provides a service provider that wraps go-build's build, release, and SDK subsystems as REST endpoints with WebSocket event streaming.
Package api provides a service provider that wraps go-build's build, release, and SDK subsystems as REST endpoints with WebSocket event streaming.
build
Package build provides project type detection and cross-compilation for the Core build system.
Package build provides project type detection and cross-compilation for the Core build system.
build/builders
Package builders provides build implementations for different project types.
Package builders provides build implementations for different project types.
build/installers
Package installers generates installer shell scripts for Core CLI releases.
Package installers generates installer shell scripts for Core CLI releases.
build/packages
Package packages builds native OS package formats from a built binary.
Package packages builds native OS package formats from a built binary.
build/signing
Package signing provides code signing for build artifacts.
Package signing provides code signing for build artifacts.
release
Package release provides release automation with changelog generation and publishing.
Package release provides release automation with changelog generation and publishing.
release/publishers
Package publishers provides release publishing implementations.
Package publishers provides release publishing implementations.
sdk
Package sdk provides OpenAPI SDK generation and diff capabilities.
Package sdk provides OpenAPI SDK generation and diff capabilities.
sdk/generators
Package generators provides SDK code generators for different languages.
Package generators provides SDK code generators for different languages.

Jump to

Keyboard shortcuts

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