web

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Overview

Package web provides a way to run ADK using a web server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildBaseRouter

func BuildBaseRouter() *mux.Router

BuildBaseRouter returns the main router, which can be extended by sub-routers.

func NewLauncher

func NewLauncher(sublaunchers ...Sublauncher) launcher.SubLauncher

NewLauncher creates a new WebLauncher. It should be extended by providing one or more Sublaunchers that add the actual content and functionality.

Types

type Sublauncher

type Sublauncher interface {
	// Keyword is used to request usage of the Sublauncher from command-line
	Keyword() string
	// Parse after parsing command line args returns the remaining un-parsed arguments or error
	Parse(args []string) ([]string, error)
	// CommandLineSyntax returns a formatted string explaining command line syntax to end user
	CommandLineSyntax() string
	// SimpleDescription returns a short explanatory text displayed to end user
	SimpleDescription() string

	// SetupSubrouters adds sublauncher-specific routes to the router.
	SetupSubrouters(router *mux.Router, config *launcher.Config) error
	// UserMessage is a hook for sublaunchers to print a message to the user when the web server starts.
	UserMessage(webURL string, printer func(v ...any))
}

Sublauncher defines an interface for extending the WebLauncher. Each sublauncher can add its own routes, wrap existing handlers, and parse its own command-line flags.

Directories

Path Synopsis
Package a2a provides a sublauncher that provides A2A capabilities.
Package a2a provides a sublauncher that provides A2A capabilities.
Package api provides a sublauncher that adds ADK REST API capabilities.
Package api provides a sublauncher that adds ADK REST API capabilities.
Package webui provides a sublauncher that adds ADK Web UI capabilities.
Package webui provides a sublauncher that adds ADK Web UI capabilities.

Jump to

Keyboard shortcuts

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