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

runner

package
v0.9.0 Latest Latest
Warning

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

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

Documentation

Overview

Package runner carries what the runner handed this app process, through contexts.

Index

Constants

This section is empty.

Variables

View Source
var ErrNoRunner = errs.New("E-RUN-004", "this context does not carry the app's runner",
	"pass the context of a request, or the one app.Options.OnStart receives")

ErrNoRunner is returned by building blocks called with a context that does not come from the app.

Functions

func With

func With(ctx context.Context, s *Session) context.Context

With returns a copy of ctx carrying s.

Types

type Session

type Session struct {
	App, Env, Version string
	Settings          map[string]string
	CSRFKey           []byte
	// Dir is the runner's folder of sockets.
	Dir     string
	Secrets runnerv1connect.SecretsServiceClient
	Files   runnerv1connect.FilesServiceClient
	Mail    runnerv1connect.MailServiceClient
	Rpc     runnerv1connect.RpcServiceClient
	Export  func(*runnerv1.Span) // never blocks
}

Session is what the runner handed the process at start-up.

func From

func From(ctx context.Context) *Session

From returns the session carried by ctx, or nil.

Jump to

Keyboard shortcuts

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