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

app

package
v1.10.21 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2023 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Header = `` /* 1911-byte string literal not displayed */

)

Variables

This section is empty.

Functions

func Run

func Run(app App) int

Types

type App

type App interface {
	// Start kicks off the application and returns immediately.
	// Start should only be called once.
	Start() error

	// Stop notifies the application to exit and returns immediately.
	// Stop should only be called after [Start].
	// It is safe to call Stop multiple times.
	Stop() error

	// ExitCode should only be called after [Start] returns with no error. It
	// should block until the application finishes
	ExitCode() (int, error)
}

func New

func New(config node.Config) (App, error)

Jump to

Keyboard shortcuts

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