renderer

package
v0.1.34 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package renderer supervises the Bun process that serves the Nuxt frontend.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResolveEntrypoint

func ResolveEntrypoint(configured string) (string, bool, error)

ResolveEntrypoint resolves an explicit entrypoint, or finds the nearest web/.output/server/index.mjs while walking upward from cwd. The second return value is false outside a source checkout when no renderer was configured.

Types

type Options

type Options struct {
	Entrypoint string
	Socket     string
	APISocket  string
	Stdout     io.Writer
	Stderr     io.Writer
}

Options configures the supervised Nuxt renderer.

type Process

type Process struct {
	// contains filtered or unexported fields
}

Process is a running Bun renderer.

func Start

func Start(options Options) (*Process, error)

Start launches Bun, waits for the renderer to accept connections on its socket, and then returns ownership of the process to the caller.

func (*Process) Close

func (p *Process) Close() error

Close asks Bun to shut down gracefully, waits, and kills it only if it does not exit within ten seconds. The exact renderer socket is then removed.

func (*Process) Done

func (p *Process) Done() <-chan struct{}

Done closes when Bun exits.

func (*Process) Err

func (p *Process) Err() error

Err reports the process exit status. It is intended to be read after Done.

func (*Process) Socket

func (p *Process) Socket() string

Socket returns the renderer socket path.

Jump to

Keyboard shortcuts

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