web

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: MIT Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetLog

func SetLog(l *zap.SugaredLogger)

SetLog sets the logger from outside the package.

func Start

func Start(port uint16, builder func() *starbox.RunnerConfig) error

Start serves trusted, host-selected code on loopback. Hosts needing graceful cancellation or an explicit remote bind should use StartContext.

func StartContext added in v0.1.3

func StartContext(ctx context.Context, cfg Config, builder func() *starbox.RunnerConfig) error

StartContext returns startup/serve errors to the host. Cancellation stops admission, cancels request execution, drains connections, then closes stragglers.

Types

type Config added in v0.1.3

type Config struct {
	Address        string
	MaxBodyBytes   int64
	MaxConcurrent  int
	RequestTimeout time.Duration
}

Config defines the host's HTTP admission and execution limits. All limits must be positive. They do not replace process isolation for untrusted code.

func DefaultConfig added in v0.1.3

func DefaultConfig(port uint16) Config

DefaultConfig binds loopback and gives each request bounded input and time.

Jump to

Keyboard shortcuts

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