Documentation
¶
Overview ¶
Package builder assembles a custom RoadRunner binary from the downloaded source tree and the user plugin set.
Index ¶
- type Builder
- type Option
- func WithDebug(debug bool) Option
- func WithExcludes(es []velox.Exclude) Option
- func WithGOARCH(goarch string) Option
- func WithGOOS(goos string) Option
- func WithLogger(log *slog.Logger) Option
- func WithOutputDir(outputDir string) Option
- func WithPlugins(plugins ...*plugin.Plugin) Option
- func WithRRVersion(rrVersion string) Option
- func WithRace(race bool) Option
- func WithReplaces(rs []velox.Replace) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder turns a downloaded RoadRunner source tree and a user plugin set into a custom binary.
func NewBuilder ¶
NewBuilder creates a Builder rooted at the directory holding the downloaded RoadRunner source tree.
type Option ¶
type Option func(*Builder)
Option configures a Builder and is passed to NewBuilder.
func WithDebug ¶
WithDebug toggles the debug build profile (no inlining, no optimization, debug tag).
func WithExcludes ¶
WithExcludes sets the go.mod exclude directives to apply before tidy.
func WithGOARCH ¶
WithGOARCH sets the target GOARCH for cross-compilation.
func WithLogger ¶
WithLogger sets the builder logger and ignores a nil value so the discard default survives.
func WithOutputDir ¶
WithOutputDir sets the directory where the final binary is placed.
func WithPlugins ¶
WithPlugins sets the plugins to include in the binary.
func WithRRVersion ¶
WithRRVersion sets the RoadRunner ref that fills the `-X meta.version` ldflag.
func WithReplaces ¶
WithReplaces sets the go.mod replace directives to apply before tidy.