startcmd

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: MIT Imports: 9 Imported by: 0 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

Overview

Package startcmd is the start group: osapi start, which runs the NATS server, the controller and the agent in one process.

Index

Constants

This section is empty.

Variables

View Source
var Group = command.Register(command.Define(
	"start", "Start all components (NATS, controller, agent)",
	command.Flat(),
	command.Uses[Deps](),
	command.Config("telemetry", config.Telemetry{}),
	command.Process("start").
		Short("Start all components (NATS, controller, agent)").
		Long("This runs the embedded NATS server, the API server and the agent together.\n"+
			"Use it for a deployment on one host. For a deployment on more than one\n"+
			"host, start the NATS server, the controller and each agent alone.\n\n"+
			"The NATS server starts first, and waits until it is ready. Then osapi\n"+
			"makes the streams and buckets, starts the API server and starts the agent.\n"+
			"On `SIGINT` or `SIGTERM`, the three components stop at the same time, in\n"+
			"10 seconds or less. Then osapi closes the NATS connections and the\n"+
			"telemetry exporters.").
		Example("").
		Logs(startLogs...).
		Setup(Start),
))

Group is the start group's definition. It is flat at the root, so its method is osapi start.

Functions

func Start

func Start(
	ctx context.Context,
	d Deps,
) (command.Running, error)

Start checks the host and starts one tracer. Then it makes the NATS server, which the others connect to, the controller and the agent, with the namespace of the controller for the job subjects. The agent's connection closes, then the tracer stops, after the components stop.

Types

type Deps

type Deps struct {
	NATS       natsserver.Deps
	Controller controllercmd.Deps
	Agent      agentcmd.Deps
}

Deps is what start uses: what each of the three components uses alone.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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