cli

package
v0.1.78 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2026 License: MIT Imports: 71 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(version, commit string)

Execute parses argv and dispatches. It owns the process exit code so that main stays a one-liner.

func RunService

func RunService(cmd *cobra.Command, name string, run func(ctx context.Context) error) error

RunService is the single contract for every long-running command — `serve`, `work`, `cron start`. It owns signal handling and the drain deadline so each service only has to respect ctx and return.

The passed function must return when ctx is cancelled. If it does not return within shutdownGrace we stop waiting and let the process exit; a worker stuck on an unresponsive socket must not block the pod's termination.

Types

This section is empty.

Jump to

Keyboard shortcuts

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